三层报工bug修复

master
zhaoxiaolin 10 months ago
parent faa2cc217d
commit 1911b6657d

@ -398,7 +398,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
}
}else if(workOrders.size()>=3){
MesReportWork hzWorks = null;
BigDecimal gamng = null;
for(int n=0;n<workOrders.size();n++){
MesReportWork workOrder = workOrders.get(n);
@ -409,12 +409,15 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
if (sHzWorks == null) {
return R.fail(workOrder.getWorkorderCode()+"未查询到报工单");
}
if(n==0){
hzWorks = sHzWorks;
if(n == (workOrders.size()-2)){
gamng = sHzWorks.getQuantityFeedback();
}
if(n == (workOrders.size()-1)){
sHzWorks.setQuantityFeedback(gamng);
}
//三层以上工单报工
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工开始");
sHzWorks.setQuantityFeedback(hzWorks.getQuantityFeedback());
sapRson = this.reportHzToSap(sHzWorks);
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工结束:"
+ JSONObject.toJSONString(sapRson));

@ -273,8 +273,14 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
@DS("#header.poolName")
public int reportSapCancel(MesReportWork mesReportWork) {
mesReportWork.setFactoryCode(ServletUtils.getRequest().getHeader("PoolName"));
int m = mesReportWorkMapper.reportSapCancel(mesReportWork);
return m;
mesReportWorkMapper.reportSapCancel(mesReportWork);
ProOrderWorkorder son = mesReportWorkMapper.getSonWorkOrder(mesReportWork.getWorkorderCode());
while(son != null){
mesReportWork.setWorkorderCode(son.getWorkorderCode());
mesReportWorkMapper.reportSapCancel(mesReportWork);
son = mesReportWorkMapper.getSonWorkOrder(son.getWorkorderCode());
}
return 1;
}
@Override

@ -520,9 +520,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
pow.del_flag = '0'
<if test="keywords != null and keywords != ''">
and pow.order_code like concat('%', #{keywords}, '%') or
pow.workorder_code_sap like concat('%', #{keywords}, '%') or
mrw.productCode like concat('%', #{keywords}, '%')
and (
pow.order_code like concat('%', #{keywords}, '%') or
pow.workorder_code_sap like concat('%', #{keywords}, '%') or
mrw.productCode like concat('%', #{keywords}, '%')
)
</if>
<if test="feedbackTimeStart != null "> and pow.product_date >= #{feedbackTimeStart}</if>
<if test="feedbackTimeEnd != null "> and #{feedbackTimeEnd} >= pow.product_date</if>

@ -193,6 +193,24 @@ public class QcCheckTaskIncome extends BaseEntity {
private String noOkQualityNames;
private String noOkQualityVals;
private String materialType;//来料类别
private String materialFrom;//物料来源
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMaterialFrom() {
return materialFrom;
}
public void setMaterialFrom(String materialFrom) {
this.materialFrom = materialFrom;
}
public String getCheckLocName() {
return checkLocName;
}

@ -412,7 +412,10 @@ public class SapItemSyncImpl implements SapItemSyncService {
qcCheckTaskIncomeDTO.setRecordId(IdUtils.fastSimpleUUID());
qcCheckTaskIncomeDTO.setCheckType("checkTypeLL");
qcCheckTaskIncomeDTO.setTypeCode("material");
qcCheckTaskIncomeDTO.setOrderType("bc");//包材
/**8010 8020 8030 8040 8050 8060
8061 8062 8070 广8090 **/
qcCheckTaskIncomeDTO.setOrderType(maraTable.getString("MTART"));//物料类型
qcCheckTaskIncomeDTO.setAttr4(maraTable.getString("MTBEZ"));//物料类型描述
qcCheckTaskIncomeDTO.setOrderNo(maraTable.getString("EBELN"));//采购订单
qcCheckTaskIncomeDTO.setSupplierCode(maraTable.getString("LIFNR"));
qcCheckTaskIncomeDTO.setSupplierName(maraTable.getString("LIFNR_NM"));

Loading…
Cancel
Save