Commit 9b86a3b2 authored by 刘学辉's avatar 刘学辉

品质异常单产品类型调整

parent 245c9c9d
......@@ -116,3 +116,5 @@ ADD COLUMN `comments` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai
ALTER TABLE `topsun_dev`.`ep_sale_order_cancel_item`
ADD COLUMN `PRICE` decimal(10, 3) NULL COMMENT '单价' AFTER `PROCESS`,
ADD COLUMN `AMOUNT` decimal(10, 3) NULL COMMENT '总价' AFTER `PRICE`;
--2024-10-25 品质异常单增加产品类别名称
ALTER TABLE topsun_dev.sap_exception_report ADD product_type_name varchar(100) NULL;
......@@ -217,6 +217,17 @@ function initSerachBox(){
$('#customerOrderNo').val(data.VBELN);
}
});
//产品类别
$('#productTypeName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "MATKL"}
},
onChange: function (value, data) {
$('#productType').val(data.MATKL);
$('#productTypeName').val(data.WGBEZ);
}
});
}
function initProduceGrid() {
......
......@@ -43,7 +43,8 @@
<x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/>
<x:selectC name="exceptionReasonType" label="异常原因分类" labelCol="1" fieldCol="2" required="true" dictionary="exceptionReasonType"/>
<x:inputC name="productType" label="产品类别" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="productTypeName" label="产品类别" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="productType"/>
<!--x:inputC name="appealNo" label="客诉编号" labelCol="1" fieldCol="2" required="false"/-->
<x:inputC name="exceptionDate" label="异常日期" labelCol="1" fieldCol="2" required="false" wrapper="date"/>
</div>
......
......@@ -16,7 +16,6 @@ import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication;
import com.huigou.topsun.common.CommonUtils;
import com.huigou.topsun.ep.order.domain.vo.EpSaleOrderItemVo;
import com.huigou.topsun.sap.common.HttpClient;
import com.huigou.topsun.sap.common.application.SapMutualEpLogApplication;
import com.huigou.topsun.sap.common.domain.SapResult;
......@@ -25,14 +24,14 @@ import com.huigou.topsun.sap.exceptionReport.domain.*;
import com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest;
import com.huigou.topsun.sap.exceptionReport.domain.vo.PurchaseOrderItemVo;
import com.huigou.topsun.sap.exceptionReport.domain.vo.PurchaseOrderVo;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportPayableRepository;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportRepository;
import com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportResponsibleRepository;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.fn.CodeGenerator;
import com.huigou.uasp.bmp.operator.OperatorApplication;
import com.huigou.uasp.bmp.opm.application.OrgApplication;
import com.huigou.uasp.bmp.opm.domain.model.org.Org;
import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.uasp.bpm.ProcessAction;
......@@ -56,7 +55,6 @@ import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
import sun.applet.resources.MsgAppletViewer_es;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
......@@ -82,7 +80,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
private ExceptionReportItemApplication exceptionReportItemApplication;
@Autowired
private com.huigou.uasp.bpm.engine.repository.ProcUnitHandlerRepository procUnitHandlerRepository;
private ProcUnitHandlerRepository procUnitHandlerRepository;
@Autowired
private ExceptionReportDutyPersonApplication exceptionReportDutyPersonApplication;
@Autowired
......@@ -111,6 +109,8 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
@Autowired
private TaskExecutor asyncWriteExecutor;
private final String respNodeCode="responsibleAudit"; //责任人审批的节点名称
@Override
public Map<String, Object> slicedExceptionReportList(ExceptionReportQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReport");
......@@ -275,9 +275,11 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
RuntimeTaskExtension runtimeTaskExtension = actApplication.loadRuntimeTaskExtension(params.getString("taskId"));
ProcUnitHandler procUnitHandler = procUnitHandlerApplication.loadProcUnitHandler(runtimeTaskExtension.getProcUnitHandlerId());
String nodeCode=procUnitHandler.getSubProcUnitId();
// procUnitHandler.getApprovalRuleHandlerId();
// select handler_kind_id from topsun_dev.wf_approvalrulehandler where id='d30bb1717a1b11ef98170242ac110002'
params.putProperty("subProcUnitId",nodeCode);
//责任人审批阶段 更换责任人不能超过三次
if ("responsibleAudit".equals(nodeCode)&&currOperatorIsResponse&&rslist.size()>=3&&!lastResponsible.getCheckOperator().equals(exceptionReport.getCheckOperator())){
if (respNodeCode.equals(nodeCode)&&currOperatorIsResponse&&rslist.size()>=3&&!lastResponsible.getCheckOperator().equals(exceptionReport.getCheckOperator())){
throw new RuntimeException("责任人的更换不能超过三次!");
}
boolean currResponseExist=false; //当前操作部门是否已经被指定过
......@@ -287,7 +289,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
break;
}
}
if ("responsibleAudit".equals(nodeCode)&&currResponseExist){
if (respNodeCode.equals(nodeCode)&&currResponseExist){
throw new RuntimeException("责任部门:"+exceptionReport.getDutyDeptName()+"已经被指定过!");
}
if (!lastResponsible.getCheckOperator().equals(exceptionReport.getCheckOperator())){
......@@ -303,7 +305,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
if (StringUtils.isNotBlank(exceptionReport.getDutyDept())){ //责任部门不为空
//增加责任人的审批 params.getProperty("processAction") advance
saveHistoryCheckOperator(exceptionReport);
if ("responsibleAudit".equals(params.getString("subProcUnitId"))) { //是责任人审批,才产生待办任务
if (respNodeCode.equals(params.getString("subProcUnitId"))) { //是责任人审批,才产生待办任务
this.saveResponsibleApprover(params, exceptionReport);
}
}
......@@ -692,7 +694,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
//删除异常的待处理记录
// WF_ProcUnitHandler procunitha0_ where `BIZ_CODE`='ER20241023-0001' and
// and `HANDLER_ID`='8b2ff3c3ed0011eea8a50242ac110003@FAD723F9507946628516EFBF316DC59F' and `STATUS`=0
String sql="DELETE FROM WF_ProcUnitHandler where BIZ_ID='"+bizId+"' and SUB_PROC_UNIT_ID='responsibleAudit'";
// String sql="DELETE FROM WF_ProcUnitHandler where BIZ_ID='"+bizId+"' and SUB_PROC_UNIT_ID='"+respNodeCode+"'";
//sqlExecutorDao.executeUpdate(sql);
}
......
......@@ -205,6 +205,8 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "product_type")
private String productType;
@Column(name = "product_type_name")
private String productTypeName;
@Column(name = "source_bill_code")
private String sourceBillCode;
......
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