| | |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.log.annotation.OperateLog; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(orderDTO.getCodeRuleOid()); |
| | | final BladeUser user = AuthUtil.getUser(); |
| | | //1.判断规则中除了流水码段,是否有其他码段 |
| | | checkSecValueOnOrder(ruleVO, orderDTO); |
| | | //2.判断必输项 |
| | |
| | | //cbo.setCreator(String.valueOf(AuthUtil.getUser().getUserId()));、 |
| | | if(authUser) { |
| | | // 要求显示账号,所以做了更改 |
| | | cbo.setCreator(String.valueOf(AuthUtil.getUser().getAccount())); |
| | | cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getAccount())); |
| | | cbo.setCreator(String.valueOf(user.getAccount())); |
| | | cbo.setLastModifier(String.valueOf(user.getAccount())); |
| | | }else{ |
| | | cbo.setCreator(orderDTO.getCreator()); |
| | | cbo.setLastModifier(orderDTO.getLastModifier()); |
| | | } |
| | | cbo.setTenantId(AuthUtil.getTenantId()); |
| | | cbo.setTenantId(user.getTenantId()); |
| | | if(StringUtils.isNotBlank(orderDTO.getLcStatus())||StringUtils.isNotBlank(orderDTO.getData().get("lcStatus"))){ |
| | | cbo.setLcStatus(StringUtils.isNotBlank(orderDTO.getLcStatus())?orderDTO.getLcStatus():orderDTO.getData().get("lcStatus")); |
| | | } |
| | |
| | | cbo.setDescription(orderDTO.getDescription()); |
| | | cboList.add(cbo); |
| | | |
| | | List<String> codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), cboList); |
| | | List<String> codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), cboList,user); |
| | | |
| | | batchSaveSelectChar(templateVO, cboList); |
| | | return codeList.size() > 0 ? codeList.get(0) : ""; |