kimi42345
2020-03-23 5bac93baf5659ce013163f884c9dce41990a860e
src/main/java/com/highdatas/mdm/service/impl/SysAssembleServiceImpl.java
@@ -83,9 +83,10 @@
    ITUserService userService;
    @Autowired
    RuleClient ruleClient;
    @Autowired
    IMasterModifiedService masterModifiedService;
    @Override
    @Transactional(rollbackFor=Exception.class)
    public Result run(String id) {
        if (StringUtils.isEmpty(id)) {
            return Result.error(CodeMsg.ERROR_PARAMS_NOT_MATHED);
@@ -231,6 +232,9 @@
                //默认需要审批
                audit = true;
            }
            // 处理关联人
            if (audit) {
                String chargeId = menuMapping.getChargeId();
                TUser user = userService.selectById(chargeId);
@@ -243,6 +247,7 @@
                maintain.setFlowId(flows.getId());
                maintain.setDesp("启动汇集流程");
                maintain.updateById();
                masterModifiedService.dealAssemble(maintain.getId(), assemble.getUserId(), true);
            }else  {
                //直接运行
                Flows flows = new Flows().setStatus(ActivitiStatus.open).setBusinessId(maintain.getId()).setId(DbUtils.getUUID()).setCreateTime(new Date());
@@ -250,6 +255,7 @@
                maintain.setFlowId(flows.getId());
                maintain.updateById();
                maintainService.dealFlow(maintain.getId(), ActivitiStatus.open);
                masterModifiedService.dealAssemble(maintain.getId(), assemble.getUserId(), false);
            }
            return Result.success(null);
        }catch (Exception e) {
@@ -384,10 +390,9 @@
                    PreparedStatement updatedPreparedStatement = conn.prepareStatement(updatedSql);
                    int updateCnt = updatedPreparedStatement.executeUpdate();
                    cnt = updateCnt;
                    tableInfoMapper.insertMatintainDetailFromTemp(DbUtils.quotedStr(maintain.getId()), maintain.getTableName() + Constant.RECORD , DbUtils.quotedStr(Operate.update.toString()));
                }
            }
            tableInfoMapper.insertMatintainDetailFromTemp(DbUtils.quotedStr(maintain.getId()), maintain.getTableName() + Constant.RECORD , DbUtils.quotedStr(Operate.update.toString()));
            //tableInfoMapper.updateStdId( maintain.getTableName() + Constant.RECORD);
@@ -412,6 +417,7 @@
            }
        }
    }
    private Result temp2record(SysAssemble assemble) {
        Connection conn = null;
        try {
@@ -461,7 +467,6 @@
                String joinStr = getJoinFieldParse(unionCodeFields);
                // insert
                String insertFieldStr = fieldsFromTable.stream()
                        .map(s -> MessageFormat.format(Constant.Alias,Constant.T1,s))
                        .collect(Collectors.joining(Constant.COMMA));