| | |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.ubcs.starter.web.constant.RegExpConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private FormulaServiceImpl formulaService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = VciBaseException.class) |
| | | public List<String> productCodeAndSaveData(CodeClassifyFullInfoBO classifyFullInfoBO, CodeClassifyTemplateVO templateVO, CodeRuleVO ruleVO, List<CodeOrderSecDTO> secDTOList, List<BaseModel> dataCBOList) throws Exception { |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // WebUtil.setPersistence(false); |
| | |
| | | String code = cbo.getId(); |
| | | List<String> serialUnitList = new ArrayList<>(); |
| | | String[] secLengths = cbo.getData().get(CODE_SEC_LENGTH_FIELD).split("#"); |
| | | cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//将此key除去 |
| | | cbo.getData().remove(IMPORT_ROW_INDEX);//将此key除去 |
| | | List<CodeBasicSecVO> secVOList = ruleVO.getSecVOList().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); |
| | | Map<String/**码段的主键**/,String/**码段的值**/> serialValueMap = new HashMap<>(); |
| | | Map<String, CodeBasicSecVO> secVOMap = secVOList.stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | |
| | | }); |
| | | } |
| | | CodeAllCode allCodeDO = new CodeAllCode(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCodeDO, MdmBtmTypeConstant.CODE_ALL_CODE); |
| | | allCodeDO.setCodeClassifyOid(classifyFullInfoBO.getCurrentClassifyVO().getOid()); |
| | | allCodeDO.setCodeRuleOid(ruleVO.getOid()); |
| | | allCodeDO.setId(cbo.getId()); |
| | |
| | | }); |
| | | codeAllCodeService.saveBatch(addCodeDOs); |
| | | } |
| | | mdmEngineService.insertBatchByType(dataCBOList.get(0).getBtmname(),dataCBOList); |
| | | } |
| | | // WebUtil.setPersistence(true); |
| | | // boService.persistenceBatch(batchCBO); |