Commit 84393494 authored by 刘学辉's avatar 刘学辉

物料主数据变更和扩展

parent 8c816fd0
......@@ -97,6 +97,9 @@ function loadNonProdApplyListGrid() {
{display: "维护类型", name: "maintenanceTypeTextView", width: 130, minWidth: 60, type: "string", align: "left",
render:function(item){
var result = item.maintenanceTypeTextView+"-待处理基本信息";
if (item.status=="1"){
result=item.maintenanceTypeTextView+"-待审批";
}
if (item.distribute == "1"){
result=item.maintenanceTypeTextView+"-待分发";
}
......
......@@ -220,10 +220,11 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
//审批通过
if (ObjectUtils.equals(parameter.getHandleResult(), 1)) { //同意
//SapNonProdApplyDept nonProdApplyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getSourceId());
// SapNonProdApplyDept newNonProdApplyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getId());
//SapNonProdApplyDept newNonProdApplyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getId());
//publishHyzyMessage(nonProdApplyBaseInfo);
Map backMap=new HashMap();
backMap.put("TYPE","C");
backMap.put("title","");
nonProdApplyDeptApplication.saveBsnMessageData(nonProdApplyBaseInfo,backMap);
}
// }
......
......@@ -75,6 +75,8 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
if (parentBaseInfo != null) {
if (baseInfo.getId().equals(parentBaseInfo.getId()) //表示是当前单据 忽略掉
|| parentBaseInfo.getStatusId() == 5 //排除终止的
|| baseInfo.getSourceId().equals(parentBaseInfo.getId())
|| baseInfo.getSourceId().equals(parentBaseInfo.getSourceId()) //扩展与变更
) {
} else {
throw new RuntimeException("汉语品名:" + sdo.getString("maktx") + "已经存在!请检查输入");
......@@ -102,13 +104,17 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
baseInfo.setMaterialUsage(sdo.getString("materialUsage"));
baseInfo.setItemAttributes(sdo.getString("itemAttributes"));
}
if ("".equals(businessCode)){ //基本信息维护
baseInfo.setMaktxRemZh(sdo.getString("maktxRemZh"));
baseInfo.setMaktxRemEn(sdo.getString("maktxRemEn"));
baseInfo.setTextDescription(sdo.getString("textDescription"));
}
if ("V".equals(businessCode)) { //销售视图
baseInfo.setBrand(sdo.getString("brand"));
baseInfo.setBrand(sdo.getString("brandName"));
}
baseInfo.setMaktxRemZh(sdo.getString("maktxRemZh"));
baseInfo.setMaktxRemEn(sdo.getString("maktxRemEn"));
nonProdApplyBaseInfoRepository.save(baseInfo);
NonProdApplyDeptVo deptVo=null;
......@@ -160,7 +166,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
nonProdApplyDept = this.save(nonProdApplyDept);
String applyDeptId=sdo.getString("applyDeptId");
//分发操作
if ((StringUtil.isBlank(businessCode)||"INIT_DPT".equals(businessCode))&&"2".equals(sdo.getString("distribute"))) { //业务类型为空 ,表示是基本信息进入的 才保存分发信息
//保存部门分发任务
//获取分发的部门与人员信息
......@@ -178,6 +184,25 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
}
saveDeptStaff(deptStaffList, nonProdApplyDept.getApplyDeptId(),genericName);
}
//不是分发的
if (StringUtil.isBlank(businessCode)&&active ==1&&StringUtil.isBlank(sdo.getString("distribute"))){ //基本信息提交后 发送待分发的待办消息
//先结束 基本信息的待办
BsnMessageSponsor bsnMessageSponsor2=bsnMessageSponsorRepository.findByBusinessId(baseInfo.getId());
if (bsnMessageSponsor2!=null){
List<BsnMessageExecute> bsnMsgList2 = bsnMessageExecuteRepository.findAllByMessageSponsorId(bsnMessageSponsor2.getId());
for (BsnMessageExecute bsnMessageExecute : bsnMsgList2) {
if ("HYZY".equals(bsnMessageExecute.getBusinessCode())) {
bsnMessageApplication.submitTask(bsnMessageExecute.getId());
}
}
}
//产生待分发的待办信息
Map backMap=new HashMap();
backMap.put("TYPE","D");
backMap.put("title",nonProdApplyDept.getMaktx()); //汉语品名
saveBsnMessageData(baseInfo,backMap);
}
if (active!=null&&active == 2&&opstatus.equals("1")){//各部门都提交后,隐藏消息
bsnMessageApplication.submitTask(meId);
//如果所有的业务部门处理完 ,则推送SAP
......@@ -272,7 +297,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
//结束分发任务的待办信息
NonProdApplyBaseInfo nonProdApplyBaseInfo=nonProdApplyBaseInfoRepository.findOne(sdo.getString("id"));
//SapNonProdApplyDept sapNonProdApplyDept=nonProdApplyDeptRepository.findByBaseInfoId(sdo.getString("id"));
if(nonProdApplyBaseInfo.getMaintenanceType().equals("new")) { //新申请的 分发后结束分发人的待办信息 06.17
// if(nonProdApplyBaseInfo.getMaintenanceType().equals("new")) { //新申请的 分发后结束分发人的待办信息 06.17
BsnMessageSponsor bsnMessageSponsor=bsnMessageSponsorRepository.findByBusinessId(nonProdApplyBaseInfo.getId());
if (bsnMessageSponsor!=null){
List<BsnMessageExecute> bsnMsgList = bsnMessageExecuteRepository.findAllByMessageSponsorId(bsnMessageSponsor.getId());
......@@ -282,8 +307,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
}
}
}
}
// }
//发布各业务人员待处理的任务
bsnMessageApplication.publishTasks((String) map.get("applyDeptId"));
......@@ -418,6 +442,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
sapMutualEpLogApplication.saveSapMutualEpLog(backMap);
//Operator operator = operatorApplication.createOperatorByPersonMemberId(baseInfo.getPersonMemberId());
//向货源专员 发重新分发的消息
backMap.put("title",applyDept.getMaktx());//汉语品名
saveBsnMessageData(baseInfo,backMap);
return backStr;
......@@ -469,20 +494,23 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
messageExecute.setBusinessCode(map.get("positionCode").toString()); //HYZY
messageExecute.setActive(ActiveStatus.UNFINISHED.getValue());
messageExecute.setUpdateDate(new Date());
String sign="-.";
String title= backMap.get("title")!=null?backMap.get("title").toString():"";
if ("S".equals(backMap.get("TYPE").toString())) {
messageExecute.setTaskDescribe("" + backMap.get("MESSAGE").toString());
messageExecute.setTaskDescribe(title+sign + backMap.get("MESSAGE").toString());
} else if ("E".equals(backMap.get("TYPE").toString())) {
messageExecute.setTaskDescribe("" + backMap.get("MESSAGE").toString());
messageExecute.setTaskDescribe(title+sign + backMap.get("MESSAGE").toString());
} else if ("C".equals(backMap.get("TYPE").toString())) { //审批完成 推送待办的基本信息处理信息
String mess = "-.物料维护(";
String mess = sign+"物料维护(";
if (baseInfo.getMaintenanceType().equals("modify")) {
mess = "-.物料变更(";
mess = sign+"物料变更(";
}
if (baseInfo.getMaintenanceType().equals("extend")) {
mess = "-.物料扩展(";
mess = sign+"物料扩展(";
}
messageExecute.setTaskDescribe(baseInfo.getGenericName() + mess + map.get("deptName").toString() + ")");
messageExecute.setTaskDescribe(baseInfo.getGenericName() + mess + title + ")");
} else if ("D".equals(backMap.get("TYPE").toString())) { // 推送待分发的待办信息
messageExecute.setTaskDescribe(baseInfo.getGenericName() +sign+ "待分发(" + title+ ")");
}
bsnMessageApplication.saveBsnMessageSponsor(bsnMessageSponsor);
messageExecute.setMessageSponsorId(bsnMessageSponsor.getId());
......
......@@ -81,6 +81,7 @@ public class NonProdApplyController extends CommonController {
sdo.setProperties(map);
nonProdApplyBaseInfo.setFullId("");
nonProdApplyBaseInfo.setSourceId(bizId);
Map<String, String> dictMapUsage = DictUtil.getDictionary("serviceusage");
List<Map<String, String>> list = new ArrayList<>();
//for (Map maps:mapUsage){
......
......@@ -396,6 +396,7 @@ public void getBaseInfoAttrs(NonProdApplyBaseInfo baseInfo,SapNonProdApplyDept n
nonProdApplyDept.setMaktxRemEn(baseInfo.getMaktxRemEn());
nonProdApplyDept.setMaktxRemZh(baseInfo.getMaktxRemZh());
nonProdApplyDept.setTextDescription(baseInfo.getTextDescription());
}
// @EasySearch(queryName = "userNameSelect")
......
......@@ -956,7 +956,8 @@ public class SapNonProdApplyDept implements Serializable {
private String maktxRemZh;
@Transient
private String maktxRemEn;
@Transient
private String textDescription;
@Transient
private Date createdDate;
......
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