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; ...@@ -29,7 +29,6 @@ import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext; import com.gavel.common.utils.ThreadContext;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.service.GpfkService; import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.vo.FkCondition; import com.gavel.kwell.vo.FkCondition;
import com.gavel.kwell.vo.FkVO; import com.gavel.kwell.vo.FkVO;
import com.gavel.kwell.vo.GpResVO; import com.gavel.kwell.vo.GpResVO;
...@@ -254,14 +253,15 @@ public class GpfkController extends BaseController { ...@@ -254,14 +253,15 @@ public class GpfkController extends BaseController {
@RequestMapping(value = "/queryWoBomByWoid", method = RequestMethod.POST) @RequestMapping(value = "/queryWoBomByWoid", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public Object getWoBomByWoid(@RequestBody JSONObject param) { public Object getWoBomByWoid(@RequestBody JSONObject param) {
String woid = param.getString("woid"); // String woid = param.getString("woid");
String bzlx = param.getString("bzlx"); String bzlx = param.getString("bzlx");
String wosn = param.getString("wosn"); String wosn = param.getString("wosn");
if(StringUtils.isEmpty(woid)||StringUtils.isEmpty(wosn)){ if(StringUtils.isEmpty(bzlx)||StringUtils.isEmpty(wosn)){
setReturnMessage("条码不允许为空!"); setReturnMessage("条码不允许为空!");
return returnData(); 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){ if(wobomVOs != null){
return buildReturnData(wobomVOs); return buildReturnData(wobomVOs);
}else{ }else{
...@@ -283,7 +283,7 @@ public class GpfkController extends BaseController { ...@@ -283,7 +283,7 @@ public class GpfkController extends BaseController {
@ResponseBody @ResponseBody
public Object query(@RequestBody JSONObject param) { public Object query(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class); FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk = gpfkService.zpfk(condition); FkVO gpfk = gpfkService.zpfkUpgrade(condition);
if(gpfk!=null) { if(gpfk!=null) {
return buildReturnData(gpfk); return buildReturnData(gpfk);
} }
...@@ -294,7 +294,7 @@ public class GpfkController extends BaseController { ...@@ -294,7 +294,7 @@ public class GpfkController extends BaseController {
@ResponseBody @ResponseBody
public Object jyfk(@RequestBody JSONObject param) { public Object jyfk(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class); FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.jyfk(condition); FkVO gpfk =gpfkService.jyfkUpgrade(condition);
if(gpfk != null){ if(gpfk != null){
return buildReturnData(gpfk); return buildReturnData(gpfk);
}else{ }else{
...@@ -306,7 +306,7 @@ public class GpfkController extends BaseController { ...@@ -306,7 +306,7 @@ public class GpfkController extends BaseController {
@ResponseBody @ResponseBody
public Object wxfk(@RequestBody JSONObject param) { public Object wxfk(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class); FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.wxfk(condition); FkVO gpfk =gpfkService.wxfkUpgrade(condition);
if(gpfk != null){ if(gpfk != null){
return buildReturnData(gpfk); return buildReturnData(gpfk);
}else{ }else{
......
...@@ -3,7 +3,6 @@ package com.gavel.kwell.controller; ...@@ -3,7 +3,6 @@ package com.gavel.kwell.controller;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.gavel.kwell.service.GphyService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -20,6 +19,7 @@ import com.gavel.common.converter.DataConvert; ...@@ -20,6 +19,7 @@ import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils; import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext; import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.GpfkService; import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.service.GphyService;
import com.gavel.kwell.vo.GpfkCondition; import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO; import com.gavel.kwell.vo.GpfkVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
......
...@@ -20,7 +20,7 @@ import com.gavel.kwell.vo.GpfkCondition; ...@@ -20,7 +20,7 @@ import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO; import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.GphyCondition; import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GpwxmxVO; 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.kwell.vo.WosngzVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.persistent.Wogylx; import com.gavel.wo.persistent.Wogylx;
...@@ -129,7 +129,6 @@ public interface GpfkDao extends BaseDao { ...@@ -129,7 +129,6 @@ public interface GpfkDao extends BaseDao {
public List<Gphy> queryGphyByGpfkid(String mid); public List<Gphy> queryGphyByGpfkid(String mid);
public Wogylx getLastGx(Wogylx wogylx);
public double getNowGyFksl(Wogylx wogylx); public double getNowGyFksl(Wogylx wogylx);
...@@ -140,4 +139,37 @@ public interface GpfkDao extends BaseDao { ...@@ -140,4 +139,37 @@ public interface GpfkDao extends BaseDao {
public double checkIfContainsWobomWl(FkCondition fkCondition); public double checkIfContainsWobomWl(FkCondition fkCondition);
public double checkIfContainsGphywl(GphyCondition condition); 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; package com.gavel.kwell.dao;
import java.util.List;
import com.gavel.common.base.dao.BaseDao; import com.gavel.common.base.dao.BaseDao;
import com.gavel.kwell.vo.GphyCondition; import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO; import com.gavel.kwell.vo.GphyVO;
......
...@@ -54,14 +54,15 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -54,14 +54,15 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
@Override @Override
public List<UWoVO> queryWo() { public List<UWoVO> queryWo() {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select WO_ID,WO_DJID,WO_GCID,WO_YWRQ,WO_WLID,WO_XQSL,WO_WGSL, "); sqlMap.append("select PCJHMX_WOID as WO_ID,PCJHMX_JHSL as WO_PCSL,WO_DJID, ");
sqlMap.append(" isnull(A.PCJHMX_JHSL,0) as WO_PCSL,WLXX_CODE,WLXX_NAME,WLXX_GG "); sqlMap.append(" PCJHMX_WGSL as WO_WGSL,WO_WLID,WLXX_CODE,WLXX_NAME,WLXX_GG,WO_YWRQ");
sqlMap.append("from WO "); sqlMap.append("from PCJHMX ");
sqlMap.append(" left join (select PCJHMX_WOID,sum(PCJHMX_JHSL) as PCJHMX_JHSL "); sqlMap.append(" left join WO on WO_ID = PCJHMX_WOID ");
sqlMap.append(" from PCJHMX group by PCJHMX_WOID) A on A.PCJHMX_WOID = WO_ID "); sqlMap.append(" left join WLXX on WLXX_ID = PCJHMX_WLID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID "); sqlMap.append("where 1=1 and ( :ksrq <= PCJHMX_JHRQ and PCJHMX_JHRQ <= :jsrq ) ");
sqlMap.append("where abs(WO_WGSL) - abs(WO_XQSL) < 0 "); sqlMap.setParamValue("ksrq", DateUtils.beginOfDay(DateUtils.getDateTime()));
sqlMap.append("order by WO_YWRQ desc,WO_DJID desc "); sqlMap.setParamValue("jsrq", DateUtils.endOfDay(DateUtils.getDateTime()));
sqlMap.append("order by PCJHMX_JHRQ desc ");
return sqlMap.query(UWoVO.class); return sqlMap.query(UWoVO.class);
} }
......
...@@ -93,10 +93,9 @@ public class Gpfk extends BaseEntity { ...@@ -93,10 +93,9 @@ public class Gpfk extends BaseEntity {
@FieldMeta(fieldName = "GPFK_HGDJ", caption = "合格等级") @FieldMeta(fieldName = "GPFK_HGDJ", caption = "合格等级")
private String hgdj; private String hgdj;
@FieldMeta(fieldName = "GPFK_WLID", caption = "物料编码") @FieldMeta(fieldName = "GPFK_WLID", caption = "物料编码")
private String wlid; private String wlid;
public String getWogylx() { public String getWogylx() {
return wogylx; return wogylx;
......
...@@ -111,6 +111,13 @@ public interface GpfkService extends BaseEditService { ...@@ -111,6 +111,13 @@ public interface GpfkService extends BaseEditService {
public FkVO jyfk(FkCondition fkCondition); public FkVO jyfk(FkCondition fkCondition);
public FkVO wxfk(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 */ /** 科威尔mes工票反馈重写--end */
......
package com.gavel.kwell.service; package com.gavel.kwell.service;
import java.util.List;
import com.gavel.common.base.service.BaseEditService; import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.vo.GphyCondition; import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO; import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO; import com.gavel.kwell.vo.GphycxVO;
......
package com.gavel.kwell.service; 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.common.base.service.BaseEditService;
import com.gavel.kwell.vo.GpfkHgVO; import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO; import com.gavel.kwell.vo.PcslVO;
import com.gavel.kwell.vo.SdclVO; import com.gavel.kwell.vo.SdclVO;
import com.gavel.kwell.vo.UWoVO; 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 { public interface KmesBoardService extends BaseEditService {
......
package com.gavel.kwell.service.impl; 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.alibaba.fastjson.JSONObject;
import com.gavel.common.base.entity.BaseEntity; import com.gavel.common.base.entity.BaseEntity;
import com.gavel.common.base.service.impl.BaseEditServiceImpl; import com.gavel.common.base.service.impl.BaseEditServiceImpl;
...@@ -14,14 +26,6 @@ import com.gavel.kwell.vo.DataPointItem; ...@@ -14,14 +26,6 @@ import com.gavel.kwell.vo.DataPointItem;
import com.gavel.kwell.vo.UpointCondition; import com.gavel.kwell.vo.UpointCondition;
import com.gavel.kwell.vo.UpointVO; import com.gavel.kwell.vo.UpointVO;
import com.gavel.persistence.sql.RecordSet; 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") @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 { ...@@ -25,8 +25,22 @@ public class GphyCondition extends BaseEntity {
private String fkid; 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() { public String getFkid() {
return fkid; return fkid;
} }
......
...@@ -3,9 +3,23 @@ package com.gavel.kwell.vo; ...@@ -3,9 +3,23 @@ package com.gavel.kwell.vo;
import java.io.Serializable; import java.io.Serializable;
public class WlslItem implements Serializable { public class WlslItem implements Serializable {
private static final long serialVersionUID = 1L;
private String wlid; private String wlid;
private String wosncode;
private String bzgxid;
private Double zpsl; 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() { public String getWlid() {
return wlid; 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