优化
This commit is contained in:
@@ -163,7 +163,14 @@ public class FinishedProductServiceImpl implements FinishedProductService {
|
||||
bucketObj.put("create_time", DateUtil.now());
|
||||
bucketObj.put("print_type", "01");
|
||||
bucketObj.put("pcsn", pcsn);
|
||||
bucketRecordTable.insert(bucketObj);
|
||||
//查询有没有桶记录
|
||||
JSONObject bucketJo2 = bucketRecordTable.query("bucketunique='" + bucketunique + "'").uniqueResult(0);
|
||||
//假如有记录就更新
|
||||
if(bucketJo2 == null){
|
||||
bucketRecordTable.insert(bucketObj);
|
||||
}else{
|
||||
throw new PdaRequestException("桶码为'" + bucketunique + "'的记录已存在,不允许重复插入!");
|
||||
}
|
||||
list.add(bucketunique);
|
||||
}
|
||||
JSONObject changeObj = new JSONObject();
|
||||
|
||||
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.security.service.dto.JwtUserDto;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.pda.exception.PdaRequestException;
|
||||
import org.nl.utils.FileUtil;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||
@@ -435,7 +436,13 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
jsonBuc.put("create_id", SecurityUtils.getCurrentUserId());
|
||||
jsonBuc.put("create_name", SecurityUtils.getNickName());
|
||||
jsonBuc.put("create_time", DateUtil.now());
|
||||
bucTab.insert(jsonBuc);
|
||||
//查询有没有桶记录
|
||||
JSONObject bucketJo2 = bucTab.query("bucketunique='" + jsonBuc.getString("bucketunique") + "'").uniqueResult(0);
|
||||
if(bucketJo2 == null){
|
||||
bucTab.insert(jsonBuc);
|
||||
}else{
|
||||
throw new PdaRequestException("桶码为'" + jsonBuc.getString("bucketunique") + "'的记录已存在,不允许重复插入!");
|
||||
}
|
||||
//返回创建的每条记录 用于打印二维码
|
||||
JSONObject jsonMater = WQLObject.getWQLObject("md_me_materialbase").query("material_id = '" + MapUtil.getStr(whereJson, "material_id") + "'").uniqueResult(0);
|
||||
jsonBuc.put("material_name", jsonMater.getString("material_name"));
|
||||
|
||||
Reference in New Issue
Block a user