Commit 406c9f7b by lijingjing

二三期三级编码问题处理;

parent 0981a926
......@@ -472,16 +472,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
String factoryArea = material.getFactoryArea(), abbr = material.getAbbr();
RestAssert.fail(StringUtils.isBlank(factoryArea), "样品库-物资厂区为空");
RestAssert.fail(StringUtils.isBlank(abbr), "样品库-物资简写为空");
String type = "";
// type 处理
if (factoryArea.contains("二三期")) {
String period = userInfoService.getUserPeriod(LoginHelper.getAccount());
type = HmConst.SECOND_PERIOD.equals(period) ? "A" : "B";
type = type + (abbr.length() > 2 ? abbr : abbr + "0");
} else {
type = abbr;
}
String code = codeRuleService.getKey(type.toUpperCase(), "SN&@yyMMdd", sample);
// String type = "";
// type 处理:先注释掉,以后可能会启用
// if (factoryArea.contains("二三期")) {
// String period = userInfoService.getUserPeriod(LoginHelper.getAccount());
// type = HmConst.SECOND_PERIOD.equals(period) ? "A" : "B";
// type = type + (abbr.length() > 2 ? abbr : abbr + "0");
// } else {
// type = abbr;
// }
String code = codeRuleService.getKey(abbr.toUpperCase(), "SN&@yyMMdd", sample);
return code;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment