fix: 在企标废止流程走完后修改把流程编号放入相关流程

This commit is contained in:
wxyclub
2023-12-01 13:53:30 +08:00
parent 4b9d405f18
commit db643736e7
3 changed files with 23 additions and 5 deletions
@@ -737,8 +737,8 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
@ApiOperation(value = "企业标准 废止流程 立即废止(或者现行有效)")
@GetMapping("/repeal")
public ResponseMessage repeal(String id,String type){
return sarBussionessStandEOService.repeal(id,type);
public ResponseMessage repeal(String id,String type,String prcNum){
return sarBussionessStandEOService.repeal(id,type,prcNum);
}
@@ -69,7 +69,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
ResponseMessage cleaningDataReview();
ResponseMessage repeal(String id, String type);
ResponseMessage repeal(String id, String type,String prcNum);
String selectMaxStandSn(String standSort);
@@ -4750,19 +4750,37 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
}
@Override
public ResponseMessage repeal(String id, String type) {
public ResponseMessage repeal(String id, String type,String prcNum) {
if(type.equals("废止")){
SarBussionessStand sarBussionessStand = new SarBussionessStand();
sarBussionessStand.setId(id);
sarBussionessStand.setTextStatusBuss("3lqnlgmgcn");
baseMapper.updateById(sarBussionessStand);
SarBussionessStand sarBussionessStandDB = baseMapper.selectByPrimaryKey(id);
Map<String, Object> map = sarBussStandAttrInfoEODao.selectStandFieldAndData("XGLC", id);
String content = "";
if(map!=null){
Object xglc = map.get("XGLC");
String xglcStr = Optional.ofNullable(xglc).orElse("").toString();
String newXglcStr = "";
if (StringUtils.isNotBlank(xglcStr)) {
newXglcStr = xglcStr + ","+ prcNum;
} else {
newXglcStr = prcNum;
}
sarBussStandAttrInfoEODao.updateStandInfo(id,"XGLC",newXglcStr);
try {
content = "标准号:" + sarBussionessStandDB.getStandCode() + ""+ sarBussionessStandDB.getStandName() + "" + "关联流程由\""+ xglcStr +"\"变为\""+ newXglcStr +"\"";
sarUpdLogEOService.createBaseLog(id,"BUSINESS",content);
} catch (Exception e) {
throw new AdcDaBaseException("日志添加失败");
}
}
List<DicTypeEO> dicTypeEOS = new ArrayList<>();
// 添加删除记录
if (StringUtils.isNotBlank(sarBussionessStandDB.getTextStatusBuss())) {
dicTypeEOS = dicTypeEODao.getDicEOByDicTypeCode(sarBussionessStandDB.getTextStatusBuss());
}
String content = "";
if (dicTypeEOS.size()>0) {
content = "标准号:" + sarBussionessStandDB.getStandCode() + ""+ sarBussionessStandDB.getStandName() + "" + "文本状态由\""+ dicTypeEOS.get(0).getDicTypeName() +"\"变为\"废止\"";
}