Commit 1eb4fd6e authored by 刘学辉's avatar 刘学辉

品质异常单责任人选择的调整

parent dad4000a
...@@ -13,6 +13,31 @@ function initialize() { ...@@ -13,6 +13,31 @@ function initialize() {
$('#exceptionStateInfoList').fileList({ $('#exceptionStateInfoList').fileList({
bizId : $("#attbizId").val() bizId : $("#attbizId").val()
}); });
$("#dutyDeptName").orgTree({
filter: "dpt", excludePos: 0, param: {orgKindId: "ogn,dpt"},
back: {
text: "#dutyDeptName",
value : '#dutyDept'
},
//manageType: 'taskQuery',
onChange:function(value,data){
$('#dutyDept').val(data.id);
}
});
$("#checkOperatorName").orgTree({
filter: "psm", excludePos: 0, param: {orgKindId: "ogn,dpt,pos,psm"},
back: {
text: "#checkOperatorName",
value : '#checkOperator'
},
//manageType: 'taskQuery',
onChange:function(value,data){
// alert(data.id+data.name); alert(data.deptId+data.deptName);
$('#checkOperator').val(data.id);
$('#dutyDeptName').val(data.deptName);
$('#dutyDept').val(data.deptId);
}
});
} }
function initItemGrid() { function initItemGrid() {
......
...@@ -67,9 +67,9 @@ ...@@ -67,9 +67,9 @@
<x:textareaC name="dealMethod" required="false" label="改善措施" maxLength="120" labelCol="1" fieldCol="11" rows="3"/> <x:textareaC name="dealMethod" required="false" label="改善措施" maxLength="120" labelCol="1" fieldCol="11" rows="3"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="dutyDeptName" label="责任部门" labelCol="1" fieldCol="2" required="false"/> <x:inputC name="dutyDeptName" label="责任部门" labelCol="1" fieldCol="2" required="false" wrapper="tree"/>
<x:hidden name="dutyDept"/> <x:hidden name="dutyDept"/>
<x:inputC name="checkOperatorName" label="责任人" labelCol="1" fieldCol="2" required="false"/> <x:inputC name="checkOperatorName" label="责任人" labelCol="1" fieldCol="2" required="false" wrapper="tree"/>
<x:hidden name="checkOperator"/> <x:hidden name="checkOperator"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
......
...@@ -24,7 +24,20 @@ function initialize() { ...@@ -24,7 +24,20 @@ function initialize() {
$('#dutyDept').val(data.id); $('#dutyDept').val(data.id);
} }
}); });
$("#checkOperatorName").orgTree({
filter: "psm", excludePos: 0, param: {orgKindId: "ogn,dpt,pos,psm"},
back: {
text: "#checkOperatorName",
value : '#checkOperator'
},
//manageType: 'taskQuery',
onChange:function(value,data){
// alert(data.id+data.name); alert(data.deptId+data.deptName);
$('#checkOperator').val(data.id);
$('#dutyDeptName').val(data.deptName);
$('#dutyDept').val(data.deptId);
}
});
} }
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="dutyDeptName" label="责任部门" labelCol="1" fieldCol="2" required="false" wrapper="tree"/> <x:inputC name="dutyDeptName" label="责任部门" labelCol="1" fieldCol="2" required="false" wrapper="tree"/>
<x:hidden name="dutyDept"/> <x:hidden name="dutyDept"/>
<x:inputC name="checkOperatorName" label="责任人" labelCol="1" fieldCol="2" required="false"/> <x:inputC name="checkOperatorName" label="责任人" labelCol="1" fieldCol="2" required="false" wrapper="tree"/>
<x:hidden name="checkOperator"/> <x:hidden name="checkOperator"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
......
...@@ -7,9 +7,11 @@ import com.huigou.uasp.bmp.fn.AbstractDaoFunction; ...@@ -7,9 +7,11 @@ import com.huigou.uasp.bmp.fn.AbstractDaoFunction;
import com.huigou.uasp.bmp.fn.impl.OrgFun; import com.huigou.uasp.bmp.fn.impl.OrgFun;
import com.huigou.uasp.bmp.opm.proxy.OrgApplicationProxy; import com.huigou.uasp.bmp.opm.proxy.OrgApplicationProxy;
import com.huigou.uasp.bmp.opm.repository.org.OrgRepository; import com.huigou.uasp.bmp.opm.repository.org.OrgRepository;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import java.util.List; import java.util.List;
...@@ -110,4 +112,15 @@ public class Function extends AbstractDaoFunction { ...@@ -110,4 +112,15 @@ public class Function extends AbstractDaoFunction {
String sql = this.getSqlByname("findPersonMember"); String sql = this.getSqlByname("findPersonMember");
return this.sqlExecutorDao.queryToList(sql, OrgUnit.class,bizId); return this.sqlExecutorDao.queryToList(sql, OrgUnit.class,bizId);
} }
public List<OrgUnit> findResponsible(String bizId){
String sql = this.getSqlByname("findResponsibleException");
//sql = sql.replace("%s",tableName);
List<OrgUnit> orgUnits=this.sqlExecutorDao.queryToList(sql, OrgUnit.class,bizId);
if (StringUtil.isBlank(orgUnits.get(0).getFullId())){
sql = this.getSqlByname("findDepartException");
orgUnits=this.sqlExecutorDao.queryToList(sql, OrgUnit.class,bizId);
}
return orgUnits;
}
} }
...@@ -157,6 +157,9 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except ...@@ -157,6 +157,9 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
ExceptionReport exceptionReport = this.getBizEntity(ExceptionReport.class); ExceptionReport exceptionReport = this.getBizEntity(ExceptionReport.class);
List<ExceptionReportItem> exceptionReportItems = this.getBizEntities(ExceptionReportItem.class, "exceptionReportItems"); List<ExceptionReportItem> exceptionReportItems = this.getBizEntities(ExceptionReportItem.class, "exceptionReportItems");
List<ExceptionReportDutyPerson> exceptionReportDutyPersonList = this.getBizEntities(ExceptionReportDutyPerson.class, "personList"); List<ExceptionReportDutyPerson> exceptionReportDutyPersonList = this.getBizEntities(ExceptionReportDutyPerson.class, "personList");
if (StringUtils.isBlank(exceptionReport.getDutyDept())){
exceptionReport.setDutyDept("0");
}
exceptionReport = this.saveExceptionReport(exceptionReport); exceptionReport = this.saveExceptionReport(exceptionReport);
if (CollectionUtil.isNotEmpty(exceptionReportItems)){ if (CollectionUtil.isNotEmpty(exceptionReportItems)){
...@@ -311,7 +314,9 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except ...@@ -311,7 +314,9 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
} }
// this.saveExceptionReport(exceptionReport); // this.saveExceptionReport(exceptionReport);
//采购异常单根据责任部门是采购部门则生成供应商异常单 //采购异常单根据责任部门是采购部门则生成供应商异常单
if ("purchase".equals(exceptionReport.getBillType())&&StringUtil.isNotBlank(exceptionReport.getDutyDept())) { if ("purchase".equals(exceptionReport.getBillType())
//&&StringUtil.isNotBlank(exceptionReport.getDutyDept())
&&!"0".equals(exceptionReport.getDutyDept())) {
Org org = orgApplication.loadOrg(exceptionReport.getDutyDept()); Org org = orgApplication.loadOrg(exceptionReport.getDutyDept());
if (org.getCode().startsWith("CGB")){ //是采购部 if (org.getCode().startsWith("CGB")){ //是采购部
ExceptionReport suppExceptionReport = new ExceptionReport(); ExceptionReport suppExceptionReport = new ExceptionReport();
......
...@@ -65,6 +65,13 @@ ...@@ -65,6 +65,13 @@
SELECT o.FULL_ID, o.FULL_NAME SELECT o.FULL_ID, o.FULL_NAME
FROM sa_oporg o LEFT JOIN sap_cost_reimbursement_base_info t ON t.person_member_id = o.id WHERE t.id = ? FROM sa_oporg o LEFT JOIN sap_cost_reimbursement_base_info t ON t.person_member_id = o.id WHERE t.id = ?
</sql> </sql>
<sql name="findResponsibleException">
SELECT check_operator full_id,check_operator_name full_name from sap_exception_report t WHERE t.id = ?
</sql>
<sql name="findDepartException">
SELECT duty_dept full_id,duty_dept_name full_name from sap_exception_report t WHERE t.id = ?
</sql>
</query> </query>
</query-mappings> </query-mappings>
\ No newline at end of file
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