Merge branch 'main' of http://124.71.197.109:3000/yonyou/taikai2312 into main
This commit is contained in:
commit
afca6722ce
|
@ -1,9 +1,10 @@
|
||||||
package nccloud.web.mmpac.issue.action;
|
package nccloud.web.mmpac.issue.action;
|
||||||
|
|
||||||
|
import nccloud.framework.core.io.WebFileType;
|
||||||
import nccloud.web.platform.print.AbstractPrintAction;
|
import nccloud.web.platform.print.AbstractPrintAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产领料-备料计划列表打印
|
* 生产领料-备料计划列表打印和输出
|
||||||
*/
|
*/
|
||||||
public class IssuePrintAction extends AbstractPrintAction {
|
public class IssuePrintAction extends AbstractPrintAction {
|
||||||
@Override
|
@Override
|
||||||
|
@ -15,4 +16,8 @@ public class IssuePrintAction extends AbstractPrintAction {
|
||||||
public String getPrintServiceName() {
|
public String getPrintServiceName() {
|
||||||
return "nccloud.pubimpl.mmpac.issue.service.IssuePickmPrintOperator";
|
return "nccloud.pubimpl.mmpac.issue.service.IssuePickmPrintOperator";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WebFileType getWebFileType() {
|
||||||
|
return WebFileType.Pdf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,13 +53,15 @@ public class PickmToBuyingreqAction implements ICommonAction {
|
||||||
PickmQueryInfoDTO paramDTO = json.fromJson(read, PickmQueryInfoDTO.class);
|
PickmQueryInfoDTO paramDTO = json.fromJson(read, PickmQueryInfoDTO.class);
|
||||||
// »ñÈ¡Ö÷¼ü
|
// »ñÈ¡Ö÷¼ü
|
||||||
String[] cpickmids = paramDTO.getCpickmids();
|
String[] cpickmids = paramDTO.getCpickmids();
|
||||||
// String[] cpickmbids = paramDTO.getCpickmbids();
|
String[] cpickmbids = paramDTO.getCpickmbids();
|
||||||
// if (MMValueCheck.isEmpty(cpickmids) && (null == cpickmbids || cpickmbids.length == 0)) {
|
// if (MMValueCheck.isEmpty(cpickmids) && (null == cpickmbids || cpickmbids.length == 0)) {
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
AggPickmVO[] aggVOs = null;
|
AggPickmVO[] aggVOs = null;
|
||||||
IPickmQueryService service = ServiceLocator.find(IPickmQueryService.class);
|
IPickmQueryService service = ServiceLocator.find(IPickmQueryService.class);
|
||||||
if (MMValueCheck.isNotEmpty(cpickmids)) {
|
if (MMValueCheck.isNotEmpty(cpickmbids)) {
|
||||||
|
aggVOs = service.queryAggPickmVObyBid(cpickmbids);
|
||||||
|
} else if (MMValueCheck.isNotEmpty(cpickmids)) {
|
||||||
aggVOs = service.queryBillsByPks(cpickmids);
|
aggVOs = service.queryBillsByPks(cpickmids);
|
||||||
}
|
}
|
||||||
if (MMValueCheck.isEmpty(aggVOs)) {
|
if (MMValueCheck.isEmpty(aggVOs)) {
|
||||||
|
|
|
@ -47,13 +47,15 @@ public class PickmToPmo implements ICommonAction {
|
||||||
PickmQueryInfoDTO paramDTO = json.fromJson(read, PickmQueryInfoDTO.class);
|
PickmQueryInfoDTO paramDTO = json.fromJson(read, PickmQueryInfoDTO.class);
|
||||||
// »ñÈ¡Ö÷¼ü
|
// »ñÈ¡Ö÷¼ü
|
||||||
String[] cpickmids = paramDTO.getCpickmids();
|
String[] cpickmids = paramDTO.getCpickmids();
|
||||||
// String[] cpickmbids = paramDTO.getCpickmbids();
|
String[] cpickmbids = paramDTO.getCpickmbids();
|
||||||
// if (MMValueCheck.isEmpty(cpickmids) && (null == cpickmbids || cpickmbids.length == 0)) {
|
// if (MMValueCheck.isEmpty(cpickmids) && (null == cpickmbids || cpickmbids.length == 0)) {
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
AggPickmVO[] aggVOs = null;
|
AggPickmVO[] aggVOs = null;
|
||||||
IPickmQueryService service = ServiceLocator.find(IPickmQueryService.class);
|
IPickmQueryService service = ServiceLocator.find(IPickmQueryService.class);
|
||||||
if (MMValueCheck.isNotEmpty(cpickmids)) {
|
if (MMValueCheck.isNotEmpty(cpickmbids)) {
|
||||||
|
aggVOs = service.queryAggPickmVObyBid(cpickmbids);
|
||||||
|
} else if (MMValueCheck.isNotEmpty(cpickmids)) {
|
||||||
aggVOs = service.queryBillsByPks(cpickmids);
|
aggVOs = service.queryBillsByPks(cpickmids);
|
||||||
}
|
}
|
||||||
if (MMValueCheck.isEmpty(aggVOs)) {
|
if (MMValueCheck.isEmpty(aggVOs)) {
|
||||||
|
@ -169,21 +171,39 @@ public class PickmToPmo implements ICommonAction {
|
||||||
for (PMOItemVO itemVO: inVO.getChildrenVO()){
|
for (PMOItemVO itemVO: inVO.getChildrenVO()){
|
||||||
// itemVO.setTplanendtime();
|
// itemVO.setTplanendtime();
|
||||||
for(AggPickmVO aggPickmVO:sourceBillVOs){
|
for(AggPickmVO aggPickmVO:sourceBillVOs){
|
||||||
if(itemVO.getVsrcid().equals(aggPickmVO.getParentVO().getCpickmid())){
|
// if(itemVO.getVsrcid().equals(aggPickmVO.getParentVO().getCpickmid())){
|
||||||
String[] ids = new String[1];
|
|
||||||
ids[0] = aggPickmVO.getParentVO().getVfirstmoid();
|
|
||||||
|
|
||||||
PMOAggVO[] rvo = query.queryByPks(ids);
|
if(null!=aggPickmVO.getParentVO().getVfirstbilltype() &&aggPickmVO.getParentVO().getVfirstbilltype().equals("55A2") ){
|
||||||
if(null == rvo || rvo.length == 0){
|
String[] ids = new String[1];
|
||||||
continue;
|
ids[0] = aggPickmVO.getParentVO().getVfirstmoid();
|
||||||
}
|
|
||||||
for (PMOItemVO ritem: rvo[0].getChildrenVO()){
|
|
||||||
if(ritem.getVrowno().equals(aggPickmVO.getParentVO().getVfirstbillrowno())){
|
|
||||||
itemVO.setTplanendtime(ritem.getTplanendtime());
|
|
||||||
|
|
||||||
|
PMOAggVO[] rvo = query.queryByPks(ids);
|
||||||
|
if(null == rvo || rvo.length == 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (PMOItemVO ritem: rvo[0].getChildrenVO()){
|
||||||
|
if(ritem.getVrowno().equals(aggPickmVO.getParentVO().getVfirstbillrowno())){
|
||||||
|
itemVO.setTplanendtime(ritem.getTplanendtime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if(null!=aggPickmVO.getParentVO().getVsourcebilltype() &&aggPickmVO.getParentVO().getVsourcebilltype().equals("55A2") ){
|
||||||
|
String[] ids = new String[1];
|
||||||
|
ids[0] = aggPickmVO.getParentVO().getVsourcemoid();
|
||||||
|
|
||||||
|
PMOAggVO[] rvo = query.queryByPks(ids);
|
||||||
|
if(null == rvo || rvo.length == 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (PMOItemVO ritem: rvo[0].getChildrenVO()){
|
||||||
|
if(ritem.getVrowno().equals(aggPickmVO.getParentVO().getVsourcebillrowno())){
|
||||||
|
itemVO.setTplanendtime(ritem.getTplanendtime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
if(null !=itemVO.getCprojectid() && null!=itemVO.getCmaterialvid()){
|
if(null !=itemVO.getCprojectid() && null!=itemVO.getCmaterialvid()){
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import nc.bs.uapbd.util.MyHelper;
|
||||||
import nc.bs.uapbd.util.ThirdPartyPostRequestUtil;
|
import nc.bs.uapbd.util.ThirdPartyPostRequestUtil;
|
||||||
import nc.impl.pubapp.pattern.rule.IRule;
|
import nc.impl.pubapp.pattern.rule.IRule;
|
||||||
import nc.util.mmf.framework.base.MMArrayUtil;
|
import nc.util.mmf.framework.base.MMArrayUtil;
|
||||||
|
import nc.vo.bd.material.MaterialVO;
|
||||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
|
import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
|
||||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOHeadVO;
|
import nc.vo.mmpac.pmo.pac0002.entity.PMOHeadVO;
|
||||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOItemVO;
|
import nc.vo.mmpac.pmo.pac0002.entity.PMOItemVO;
|
||||||
|
@ -85,14 +86,25 @@ public class AfterDelSyncEpicMesRule implements IRule<PMOAggVO> {
|
||||||
*/
|
*/
|
||||||
private void buildSyncData(PMOAggVO aggVO, JSONArray orderArr) throws BusinessException {
|
private void buildSyncData(PMOAggVO aggVO, JSONArray orderArr) throws BusinessException {
|
||||||
PMOHeadVO headVo = aggVO.getParentVO();
|
PMOHeadVO headVo = aggVO.getParentVO();
|
||||||
|
PMOItemVO pmoItem = aggVO.getChildrenVO()[0];
|
||||||
|
String cdeptid = pmoItem.getCdeptid();
|
||||||
|
// 物料
|
||||||
|
String cmaterialid = pmoItem.getCmaterialid();
|
||||||
|
String goodsCode = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.CODE,
|
||||||
|
MaterialVO.PK_MATERIAL + " = '" + cmaterialid + "'");
|
||||||
// 组织
|
// 组织
|
||||||
String pkOrg = headVo.getPk_org();
|
String pkOrg = headVo.getPk_org();
|
||||||
String orgCode = MyHelper.transferField(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pkOrg);
|
String orgCode = MyHelper.transferField(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pkOrg);
|
||||||
|
String deptCode = MyHelper.transferField(DeptVO.getDefaultTableName(), DeptVO.CODE, DeptVO.PK_DEPT, cdeptid);
|
||||||
// 组装数据
|
// 组装数据
|
||||||
JSONObject orderParam = new JSONObject();
|
JSONObject orderParam = new JSONObject();
|
||||||
orderParam.put("type", "D"); // 删除标识
|
orderParam.put("type", "D"); // 删除标识
|
||||||
orderParam.put("companyCode", orgCode);// 公司编码
|
orderParam.put("companyCode", orgCode);// 公司编码
|
||||||
orderParam.put("workOrderCode", headVo.getVbillcode());// 工单号
|
orderParam.put("workOrderCode", headVo.getVbillcode());// 工单号
|
||||||
|
// 根据自定义档案中的映射关系,部门编码转换为MES中的编码
|
||||||
|
orderParam.put("siteCode", deptParams.getOrDefault(deptCode, ""));// 工厂编码
|
||||||
|
orderParam.put("produCode", goodsCode); // 产品编码
|
||||||
|
orderParam.put("qty", String.valueOf(pmoItem.getNastnum())); // 计划数量
|
||||||
orderArr.add(orderParam);
|
orderArr.add(orderParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,7 @@ public class SyncEpicMesUtil {
|
||||||
JSONObject data = new JSONObject();
|
JSONObject data = new JSONObject();
|
||||||
JSONObject orderParam = new JSONObject();
|
JSONObject orderParam = new JSONObject();
|
||||||
orderParam.put("id", null); // 唯一标识(主键)
|
orderParam.put("id", null); // 唯一标识(主键)
|
||||||
|
// 根据自定义档案中的映射关系,部门编码转换为MES中的编码
|
||||||
orderParam.put("siteCode", deptParams.getOrDefault(deptCode, ""));// 工厂编码
|
orderParam.put("siteCode", deptParams.getOrDefault(deptCode, ""));// 工厂编码
|
||||||
orderParam.put("contractNo", pmoItem.getVfirstcode());// 合同号-取ERP的源头单据号-销售订单号
|
orderParam.put("contractNo", pmoItem.getVfirstcode());// 合同号-取ERP的源头单据号-销售订单号
|
||||||
/*if (projectMap != null) {
|
/*if (projectMap != null) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产领料-备料计划列表打印服务类
|
* 生产领料-备料计划列表打印和输出服务类
|
||||||
*/
|
*/
|
||||||
public class IssuePickmPrintOperator extends BaseMetaPrintService {
|
public class IssuePickmPrintOperator extends BaseMetaPrintService {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue