Commit e4f3aaae authored by 李苏's avatar 李苏 💬

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents f3c7a8cc 3e5b549a
......@@ -29,7 +29,6 @@ import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.vo.FkCondition;
import com.gavel.kwell.vo.FkVO;
import com.gavel.kwell.vo.GpResVO;
......@@ -254,14 +253,15 @@ public class GpfkController extends BaseController {
@RequestMapping(value = "/queryWoBomByWoid", method = RequestMethod.POST)
@ResponseBody
public Object getWoBomByWoid(@RequestBody JSONObject param) {
String woid = param.getString("woid");
// String woid = param.getString("woid");
String bzlx = param.getString("bzlx");
String wosn = param.getString("wosn");
if(StringUtils.isEmpty(woid)||StringUtils.isEmpty(wosn)){
if(StringUtils.isEmpty(bzlx)||StringUtils.isEmpty(wosn)){
setReturnMessage("条码不允许为空!");
return returnData();
}
List<WobomVO> wobomVOs= gpfkService.queryWobomByWo(woid,bzlx,wosn);
// List<WobomVO> wobomVOs= gpfkService.queryWobomByWo(woid,bzlx,wosn);
List<WobomVO> wobomVOs= gpfkService.queryWobomByWoUpgrade(wosn, bzlx);
if(wobomVOs != null){
return buildReturnData(wobomVOs);
}else{
......@@ -283,7 +283,7 @@ public class GpfkController extends BaseController {
@ResponseBody
public Object query(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk = gpfkService.zpfk(condition);
FkVO gpfk = gpfkService.zpfkUpgrade(condition);
if(gpfk!=null) {
return buildReturnData(gpfk);
}
......@@ -294,7 +294,7 @@ public class GpfkController extends BaseController {
@ResponseBody
public Object jyfk(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.jyfk(condition);
FkVO gpfk =gpfkService.jyfkUpgrade(condition);
if(gpfk != null){
return buildReturnData(gpfk);
}else{
......@@ -306,7 +306,7 @@ public class GpfkController extends BaseController {
@ResponseBody
public Object wxfk(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.wxfk(condition);
FkVO gpfk =gpfkService.wxfkUpgrade(condition);
if(gpfk != null){
return buildReturnData(gpfk);
}else{
......
......@@ -3,7 +3,6 @@ package com.gavel.kwell.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gavel.kwell.service.GphyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -20,6 +19,7 @@ import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.service.GphyService;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO;
import com.gavel.persistence.sql.RecordSet;
......
......@@ -20,7 +20,7 @@ import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GpwxmxVO;
import com.gavel.kwell.vo.WolinkInfoVO;
import com.gavel.kwell.vo.WlslItem;
import com.gavel.kwell.vo.WosngzVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.persistent.Wogylx;
......@@ -129,7 +129,6 @@ public interface GpfkDao extends BaseDao {
public List<Gphy> queryGphyByGpfkid(String mid);
public Wogylx getLastGx(Wogylx wogylx);
public double getNowGyFksl(Wogylx wogylx);
......@@ -140,4 +139,37 @@ public interface GpfkDao extends BaseDao {
public double checkIfContainsWobomWl(FkCondition fkCondition);
public double checkIfContainsGphywl(GphyCondition condition);
/**科威尔工票反馈sql */
/** ------------BEGIN工票反馈升级-----------------***/
/**获取该序列号标准工序最新的反馈相关信息 */
public FkVO queryWowithIfExistGpfkByWosnAndBzgxidInNewDate(String wosnid,String bzgxid);
/**获取该序列号标准工序所有的反馈相关信息 */
public List<FkVO> queryWowithIfExistGpfkByWosnAndBzgxid(String wosnid,String bzgxid);
/**获取该序列号标准工序的订单相关信息包含最新反馈记录 */
public FkVO queryKwellWoBySnidUptoDate(String wosnid, String bzgx);
/**获取该序列号标准工序的订单相关信息包含最新反馈记录 */
public List<FkVO> queryKwellAllGpfkByWosnAndGxid(FkCondition condition);
/**查询当前订单序列号最新反馈记录 */
public GpfkVO queryGpfkByWosnUptoDate(String wosnid);
/**查询当前工序下一道工序*/
public Wogylx getNextGxUpdate(Wogylx wogylx);
/**查询当前工序上一道工序 */
public Wogylx getLastGx(Wogylx wogylx);
/**查询当前工序上一道工序 */
public double queryIfZpwc(String wosnid,String bzgx);
/**查询当前工序上一道工序 */
public List<WobomVO> queryWobomByWosnAndBzgx(String wosnid,String bzgx);
/**查询是否耗用了该物料编码 */
public double checkIfContainsGphywlUpgrade(GphyCondition condition);
/**查询是物料编码装配数量 */
public WlslItem queryKwellZpslGphy(GphyCondition condition);
/**查询是物料编码装配单位数量 */
public double queryWobomZpslByDjidAndWlidUpgrade(String wosncode,String bzgxid,String wlid);
/**查询当前订单序列号最新检验反馈记录 */
public GpfkVO queryJyGpfkByWosnUptoDate(String wosnid);
/** ------------END工票反馈升级-----------------***/
}
package com.gavel.kwell.dao;
import java.util.List;
import com.gavel.common.base.dao.BaseDao;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
......
......@@ -54,14 +54,15 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
@Override
public List<UWoVO> queryWo() {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select WO_ID,WO_DJID,WO_GCID,WO_YWRQ,WO_WLID,WO_XQSL,WO_WGSL, ");
sqlMap.append(" isnull(A.PCJHMX_JHSL,0) as WO_PCSL,WLXX_CODE,WLXX_NAME,WLXX_GG ");
sqlMap.append("from WO ");
sqlMap.append(" left join (select PCJHMX_WOID,sum(PCJHMX_JHSL) as PCJHMX_JHSL ");
sqlMap.append(" from PCJHMX group by PCJHMX_WOID) A on A.PCJHMX_WOID = WO_ID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append("where abs(WO_WGSL) - abs(WO_XQSL) < 0 ");
sqlMap.append("order by WO_YWRQ desc,WO_DJID desc ");
sqlMap.append("select PCJHMX_WOID as WO_ID,PCJHMX_JHSL as WO_PCSL,WO_DJID, ");
sqlMap.append(" PCJHMX_WGSL as WO_WGSL,WO_WLID,WLXX_CODE,WLXX_NAME,WLXX_GG,WO_YWRQ");
sqlMap.append("from PCJHMX ");
sqlMap.append(" left join WO on WO_ID = PCJHMX_WOID ");
sqlMap.append(" left join WLXX on WLXX_ID = PCJHMX_WLID ");
sqlMap.append("where 1=1 and ( :ksrq <= PCJHMX_JHRQ and PCJHMX_JHRQ <= :jsrq ) ");
sqlMap.setParamValue("ksrq", DateUtils.beginOfDay(DateUtils.getDateTime()));
sqlMap.setParamValue("jsrq", DateUtils.endOfDay(DateUtils.getDateTime()));
sqlMap.append("order by PCJHMX_JHRQ desc ");
return sqlMap.query(UWoVO.class);
}
......
......@@ -93,11 +93,10 @@ public class Gpfk extends BaseEntity {
@FieldMeta(fieldName = "GPFK_HGDJ", caption = "合格等级")
private String hgdj;
@FieldMeta(fieldName = "GPFK_WLID", caption = "物料编码")
private String wlid;
public String getWogylx() {
return wogylx;
}
......
......@@ -111,6 +111,13 @@ public interface GpfkService extends BaseEditService {
public FkVO jyfk(FkCondition fkCondition);
public FkVO wxfk(FkCondition fkCondition);
public FkVO zpfkUpgrade(FkCondition fkCondition);
public FkVO jyfkUpgrade(FkCondition fkCondition);
public FkVO wxfkUpgrade(FkCondition fkCondition);
public List<WobomVO> queryWobomByWoUpgrade(String wosn,String bzgx);
/** 科威尔mes工票反馈重写--end */
......
package com.gavel.kwell.service;
import java.util.List;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO;
......
package com.gavel.kwell.service;
import java.io.FileInputStream;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO;
import com.gavel.kwell.vo.SdclVO;
import com.gavel.kwell.vo.UWoVO;
import com.gavel.wo.persistent.Pcjhmx;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.util.List;
public interface KmesBoardService extends BaseEditService {
......
package com.gavel.kwell.service.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.entity.BaseEntity;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
......@@ -14,14 +26,6 @@ import com.gavel.kwell.vo.DataPointItem;
import com.gavel.kwell.vo.UpointCondition;
import com.gavel.kwell.vo.UpointVO;
import com.gavel.persistence.sql.RecordSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
@Service("upointService")
......
package com.gavel.kwell.utils;
import com.gavel.kzzx.model.GavelEnumModel;
import java.util.ArrayList;
import java.util.List;
public enum GpfkHgEnum {
JYHG("JYHG","检验合格"),
WXHG("WXHG", "维修合格"),
JYBHG("JYBHG","检验不合格");
private String id; //数据库存储
private String name;
GpfkHgEnum(String name, String id) {
this.id = id;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static List<GavelEnumModel> toList(){
List<GavelEnumModel> list = new ArrayList<>();
for (GpfkHgEnum e : GpfkHgEnum.values()) {
GavelEnumModel gavelEnumModel = new GavelEnumModel();
gavelEnumModel.setId(e.getId());
gavelEnumModel.setName(e.getName());
list.add(gavelEnumModel);
}
return list;
}
}
......@@ -25,8 +25,22 @@ public class GphyCondition extends BaseEntity {
private String fkid;
private String wosncode;
private String bzgxid;
public String getWosncode() {
return wosncode;
}
public void setWosncode(String wosncode) {
this.wosncode = wosncode;
}
public String getBzgxid() {
return bzgxid;
}
public void setBzgxid(String bzgxid) {
this.bzgxid = bzgxid;
}
public String getFkid() {
return fkid;
}
......
......@@ -3,9 +3,23 @@ package com.gavel.kwell.vo;
import java.io.Serializable;
public class WlslItem implements Serializable {
private static final long serialVersionUID = 1L;
private String wlid;
private String wosncode;
private String bzgxid;
private Double zpsl;
public String getWosncode() {
return wosncode;
}
public void setWosncode(String wosncode) {
this.wosncode = wosncode;
}
public String getBzgxid() {
return bzgxid;
}
public void setBzgxid(String bzgxid) {
this.bzgxid = bzgxid;
}
public String getWlid() {
return wlid;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment