opt:优化贴标流程
This commit is contained in:
@@ -395,10 +395,10 @@ public class LashManageServiceImpl implements LashManageService {
|
||||
// TODO 是否贴标
|
||||
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
||||
// TODO 贴标数量
|
||||
result.put("printQty", "4");
|
||||
result.put("printQty", "2");
|
||||
|
||||
// TODO 贴标模版
|
||||
result.put("labelingTemplate", "403");
|
||||
result.put("labelingTemplate", "201");
|
||||
// TODO 打印机
|
||||
result.put("printDevice", "1");
|
||||
//判断系统参数是否贴标
|
||||
@@ -406,6 +406,11 @@ public class LashManageServiceImpl implements LashManageService {
|
||||
if (is_labeling.equals("1")) {
|
||||
result.put("isLabeling", IOSEnum.IS_SEND.code("是"));
|
||||
|
||||
//查询贴标次数参数
|
||||
String labelingTemplateNum = iSysParamService.findByCode("labelingTemplateNum").getValue();
|
||||
result.put("printQty", labelingTemplateNum);
|
||||
|
||||
//查询贴标模板参数
|
||||
String labelingTemplate = iSysParamService.findByCode("labelingTemplate").getValue();
|
||||
result.put("labelingTemplate", labelingTemplate);
|
||||
Param label_num = null;
|
||||
@@ -417,12 +422,15 @@ public class LashManageServiceImpl implements LashManageService {
|
||||
JSONObject print_jo = new JSONObject();
|
||||
print_jo.put("box_no", box_no);
|
||||
print_jo.put("print_type", print_info.getString("print_id"));
|
||||
new PrintServiceImpl().customerPrintBY2(print_jo);
|
||||
|
||||
int times = Integer.parseInt(labelingTemplateNum);
|
||||
for(int i=0;i<times;i++){
|
||||
new PrintServiceImpl().customerPrintBY2(print_jo);
|
||||
}
|
||||
//更新打印机设备
|
||||
result.put("printDevice", print_info.getString("print_code"));
|
||||
// 贴标成功:更新系统参数贴标次数
|
||||
String label_num_up = label_num.getValue();
|
||||
String now_num = NumberUtil.sub(label_num_up, "1").toString();
|
||||
String now_num = NumberUtil.sub(label_num_up, labelingTemplateNum).toString();
|
||||
|
||||
label_num.setValue(now_num);
|
||||
iSysParamService.update(label_num);
|
||||
|
||||
Reference in New Issue
Block a user