去除删除质检报告时同步删除QMS数据的功能
This commit is contained in:
parent
e0e80b925f
commit
a69cd25896
|
|
@ -6,14 +6,7 @@
|
|||
package nc.bs.qc.c003.maintain;
|
||||
|
||||
import nc.bs.qc.c003.maintain.rule.InsertAndDelBatchCodeBeforeRule;
|
||||
import nc.bs.qc.c003.maintain.rule.SyncDeleteQcQmsRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.BillCodeReturnRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.ChkCanDeleteRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.DelFakeChkBillRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.DeleteBatchCodeAfterRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.DeleteChkbatchRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.WriteC001WhenDeleteRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.WriteC002WhenDeleteRule;
|
||||
import nc.bs.qc.c003.maintain.rule.delete.*;
|
||||
import nc.bs.qc.c003.plugin.ReportBPPlugInPoint;
|
||||
import nc.bs.scmpub.rule.VOSagaFrozenValidateRule;
|
||||
import nc.impl.pubapp.pattern.data.bill.BillDelete;
|
||||
|
|
@ -41,7 +34,6 @@ public class ReportDeleteBP {
|
|||
processer.addAfterRule(new DeleteBatchCodeAfterRule());
|
||||
processer.addAfterRule(new BillCodeReturnRule());
|
||||
processer.addAfterRule(new DelFakeChkBillRule());
|
||||
processer.addAfterRule(new SyncDeleteQcQmsRule());
|
||||
}
|
||||
|
||||
private void addBeforeRule(AroundProcesser<ReportVO> processer) {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ import nccloud.baseapp.core.log.NCCForUAPLogger;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 删除质检报告时同步删除QMS数据
|
||||
* 已弃用
|
||||
*
|
||||
* @author lihao
|
||||
*/
|
||||
public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
||||
|
||||
private static final String LOG_INFO_NAME = "qyMesLog";
|
||||
|
|
@ -174,11 +180,11 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
}
|
||||
|
||||
itemObj.put("jldw", cunitname); // 计量单位
|
||||
itemObj.put("bz", getBz(bvo,reportItemVO.getCfirstbid())); // 츠玖구鬧 箇새데구鬧
|
||||
itemObj.put("bz", getBz(bvo, reportItemVO.getCfirstbid())); // 明细备注 送货单备注
|
||||
itemObj.put("bipzyid", pkReportbill); // 质检报告ID
|
||||
itemObj.put("bipqdid", reportItemVO.getPk_reportbill_b()); // 质检报告明细ID
|
||||
String projectId = (String) getProject(bvo,reportItemVO.getCfirstbid());
|
||||
if(projectId != null) {
|
||||
String projectId = (String) getProject(bvo, reportItemVO.getCfirstbid());
|
||||
if (projectId != null) {
|
||||
String projectName = MyHelper.getStrValByCondition("bd_project", ProjectHeadVO.PROJECT_NAME,
|
||||
ProjectHeadVO.PK_PROJECT + " = '" + projectId + "'");
|
||||
|
||||
|
|
@ -187,20 +193,20 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
|
||||
// 查找编码a在b中的位置
|
||||
int index = projectName.indexOf(projectcode);
|
||||
String remaining ="";
|
||||
String remaining = "";
|
||||
// 如果不包含编码a,直接返回b(此时b是单纯的名称)
|
||||
if (index != 0) {
|
||||
remaining=projectName;
|
||||
}else{
|
||||
remaining = projectName;
|
||||
} else {
|
||||
remaining = projectName.substring(projectcode.length());
|
||||
}
|
||||
|
||||
// String[] codeandnames = projectName.split(" ");
|
||||
itemObj.put("xshth", projectcode); // 销售合同号
|
||||
itemObj.put("xmmc", remaining); //淃커츰냔
|
||||
}else{
|
||||
itemObj.put("xmmc", remaining); // 项目名称
|
||||
} else {
|
||||
itemObj.put("xshth", ""); // 销售合同号
|
||||
itemObj.put("xmmc", ""); //淃커츰냔
|
||||
itemObj.put("xmmc", ""); // 项目名称
|
||||
}
|
||||
contentArray.add(itemObj);
|
||||
}
|
||||
|
|
@ -209,23 +215,26 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
|||
updateArrveOrder(hvo.getPk_arriveorder());
|
||||
}
|
||||
}
|
||||
|
||||
private Object getProject(ArriveItemVO[] bvo, String cfirstbid) {
|
||||
for (ArriveItemVO arriveItemVO : bvo) {
|
||||
if(arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) {
|
||||
if (arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) {
|
||||
return arriveItemVO.getCprojectid();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void updateArrveOrder(String pkArriveorder) throws DAOException {
|
||||
BaseDAO dao = new BaseDAO();
|
||||
String sql = "update po_arriveorder_b set vbdef32='Y' where pk_arriveorder='"
|
||||
+ pkArriveorder + "'";
|
||||
dao.executeUpdate(sql);
|
||||
}
|
||||
|
||||
private Object getBz(ArriveItemVO[] bvo, String cfirstbid) {
|
||||
for (ArriveItemVO arriveItemVO : bvo) {
|
||||
if(arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) {
|
||||
if (arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) {
|
||||
return arriveItemVO.getVmemob();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue