质检报告删除推送qms
This commit is contained in:
parent
cfcba80d31
commit
4df22f0b94
|
|
@ -29,9 +29,7 @@ import nc.vo.qc.c003.entity.ReportVO;
|
|||
import nc.vo.sm.UserVO;
|
||||
import nccloud.baseapp.core.log.NCCForUAPLogger;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
||||
|
||||
|
|
@ -51,6 +49,7 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
throw new BusinessException("箱变的QMS接口缺少配置");
|
||||
}
|
||||
Set<String> firstIds = new HashSet<>();
|
||||
List<String> cfirstbids =new ArrayList<>();
|
||||
// 查询上游到货单的数据
|
||||
for (ReportVO vo : reportVOS) {
|
||||
ReportItemVO[] bvo = vo.getBVO();
|
||||
|
|
@ -59,13 +58,14 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
}
|
||||
for (ReportItemVO itemVO : bvo) {
|
||||
firstIds.add(itemVO.getCfirstid());
|
||||
cfirstbids.add(itemVO.getCfirstbid());
|
||||
}
|
||||
}
|
||||
if (!firstIds.isEmpty()) {
|
||||
// 上游到货单
|
||||
BillQuery<ArriveVO> billquery = new BillQuery(ArriveVO.class);
|
||||
ArriveVO[] arriveVOS = billquery.query(firstIds.toArray(new String[0]));
|
||||
buildSyncData(arriveVOS);
|
||||
buildSyncData(arriveVOS,cfirstbids);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("SyncQcQmsRule-exp:" + e.getMessage(), e);
|
||||
|
|
@ -78,7 +78,7 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
*
|
||||
* @param arriveVOS 到货单VO
|
||||
*/
|
||||
private void buildSyncData(ArriveVO[] arriveVOS) throws BusinessException {
|
||||
private void buildSyncData(ArriveVO[] arriveVOS,List<String> cfirstbids) throws BusinessException {
|
||||
for (ArriveVO arriveVO : arriveVOS) {
|
||||
ArriveHeaderVO hvo = arriveVO.getHVO();
|
||||
ArriveItemVO[] bvo = arriveVO.getBVO();
|
||||
|
|
@ -131,7 +131,12 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
String materialtype = skipNull(materialMap.get("materialtype"));
|
||||
String materialspec = skipNull(materialMap.get("materialspec"));
|
||||
itemObj.put("wlxhgg", materialtype + materialspec); // 物料型号规格
|
||||
if(cfirstbids.contains(reportItemVO.getCfirstbid())){
|
||||
itemObj.put("sjsl", "0"); // 送检数量(设计单位),按设计计量单位统计的送检数量
|
||||
}else{
|
||||
itemObj.put("sjsl", reportHeaderVO.getNapplynum().toString()); // 送检数量(设计单位),按设计计量单位统计的送检数量
|
||||
}
|
||||
|
||||
itemObj.put("jldw", cunitname); // 计量单位
|
||||
itemObj.put("bz", reportItemVO.getVbdef1()); // 明细备注,用于填写该送检物料的补充说明
|
||||
itemObj.put("bipzyid", pkReportbill); // 质检报告ID
|
||||
|
|
|
|||
Loading…
Reference in New Issue