| | |
| | | package com.highdatas.mdm.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.highdatas.mdm.entity.*; |
| | | import com.highdatas.mdm.mapper.SysAssembleMapper; |
| | | import com.highdatas.mdm.mapper.TableInfoMapper; |
| | |
| | | import com.highdatas.mdm.pojo.kettle.DataSourceInfo; |
| | | import com.highdatas.mdm.pojo.kettle.UnBigDataDataSourceInfo; |
| | | import com.highdatas.mdm.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.highdatas.mdm.util.Constant; |
| | | import com.highdatas.mdm.util.ContentBuilder; |
| | | import com.highdatas.mdm.util.DbUtils; |
| | | import com.highdatas.mdm.util.RuleClient; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.ibatis.session.SqlSession; |
| | | import org.apache.regexp.RE; |
| | | import org.jcodings.util.Hash; |
| | | import org.mybatis.spring.SqlSessionTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.InputStream; |
| | | import java.io.UnsupportedEncodingException; |
| | |
| | | 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); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | Boolean bigData = assemble.getBigdata(); |
| | | |
| | |
| | | //默认需要审批 |
| | | audit = true; |
| | | } |
| | | // 处理关联人 |
| | | |
| | | |
| | | if (audit) { |
| | | String chargeId = menuMapping.getChargeId(); |
| | | TUser user = userService.selectById(chargeId); |
| | |
| | | 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()); |
| | |
| | | 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) { |
| | |
| | | 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); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | private Result temp2record(SysAssemble assemble) { |
| | | Connection conn = null; |
| | | try { |
| | |
| | | String joinStr = getJoinFieldParse(unionCodeFields); |
| | | |
| | | // insert |
| | | |
| | | String insertFieldStr = fieldsFromTable.stream() |
| | | .map(s -> MessageFormat.format(Constant.Alias,Constant.T1,s)) |
| | | .collect(Collectors.joining(Constant.COMMA)); |