mdf:1手持出库:更新桶状态为出库2出库时间出库人字段维护3.发货确认托盘不一致问题
This commit is contained in:
@@ -19,14 +19,17 @@ import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||
import org.nl.wms.basedata.master.service.MaterialbaseService;
|
||||
import org.nl.wms.st.core.service.StorPublicService;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.ResultBean;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.wql.core.content.HttpContext;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@@ -76,8 +79,7 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
||||
}
|
||||
String workorder_id = jo.getString("workorder_id");
|
||||
JSONObject wo = pdm_bi_workorder.query("workorder_id='"+workorder_id+"'").uniqueResult(0);
|
||||
String workorder_code2 = wo.getString("workorder_code");
|
||||
if(!workorder_code2.equals(workorder_code)){
|
||||
if(wo == null ||!workorder_code.equals(wo.getString("workorder_code"))){
|
||||
throw new PdaRequestException("该载具"+storagevehicle_code+"组盘工令与所选工令不一致!");
|
||||
}
|
||||
//3、 通过托盘,查询【桶记录表】状态=入库,得到载具桶库存信息,无结果提示错误;
|
||||
@@ -92,6 +94,9 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Map<String, Object> confirmOutStore(JSONObject jsonObject) {
|
||||
//出库时更新桶记录表桶状态
|
||||
WQLObject bucket = WQLObject.getWQLObject("md_pb_bucketrecord");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
UserDto userDto = userService.findById(currentUserId);
|
||||
JSONObject mst = jsonObject.getJSONObject("mst");
|
||||
@@ -132,8 +137,10 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
||||
if(set.size()>=2){
|
||||
throw new PdaRequestException("发货物料存在多种物料,不允许发货!");
|
||||
}
|
||||
Set<String> bucketuniques = new HashSet<>();
|
||||
for(int i=0;i<dtls.size();i++){
|
||||
JSONObject dtl = dtls.getJSONObject(i);
|
||||
bucketuniques.add(dtl.getString("bucketunique"));
|
||||
String diskrecord_id = dtl.getString("diskrecord_id");
|
||||
HashMap<String,String> map = new HashMap<String,String>();
|
||||
map.put("is_send","1");
|
||||
@@ -142,6 +149,12 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
||||
map.put("out_time",DateUtil.now());
|
||||
PDM_BI_ProcedureOffline.update(map,"diskrecord_id='"+diskrecord_id+"'");
|
||||
}
|
||||
Map<String,String> updateParam = new HashMap<>();
|
||||
updateParam.put("status","04");
|
||||
if (!CollectionUtils.isEmpty(bucketuniques)){
|
||||
String allBucketunique = "(\""+bucketuniques.stream().collect(Collectors.joining("\",\""))+"\")";
|
||||
bucket.update(updateParam, "bucketunique in " + allBucketunique + " and status in ('02','03')");
|
||||
}
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
returnjo.put("desc", "操作成功!");
|
||||
|
||||
@@ -581,13 +581,10 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
// 仓位属性表【ST_IVT_StructAttr】
|
||||
WQLObject PDM_BI_ProcedureOffline = WQLObject.getWQLObject("PDM_BI_ProcedureOffline");
|
||||
|
||||
JSONObject jo = PDM_BI_ProcedureOffline.query("storagevehicle_code='"+storagevehicle_code+"'").uniqueResult(0);
|
||||
JSONObject jo = PDM_BI_ProcedureOffline.query("storagevehicle_code='"+storagevehicle_code+"' and diskrecord_id='"+jsonObject.getString("diskrecord_id")+"'").uniqueResult(0);
|
||||
if(jo==null){
|
||||
throw new BadRequestException("该载具"+storagevehicle_code+"无组盘记录!");
|
||||
}
|
||||
if (!jo.getString("diskrecord_id").equals(jsonObject.getString("diskrecord_id"))){
|
||||
throw new BadRequestException("该载具"+storagevehicle_code+"对应编号不一致!");
|
||||
}
|
||||
String is_send = jo.getString("is_send");
|
||||
if(!"1".equals(is_send)){
|
||||
throw new BadRequestException("该载具"+storagevehicle_code+"状态不是已出库状态,不允许发货!");
|
||||
|
||||
@@ -200,6 +200,8 @@
|
||||
procedureoffline.is_send AS is_send,
|
||||
procedureoffline.send_name AS send_name,
|
||||
procedureoffline.send_time AS send_time,
|
||||
procedureoffline.out_name AS out_name,
|
||||
procedureoffline.out_time AS out_time,
|
||||
procedureoffline.create_name AS create_name,
|
||||
procedureoffline.STATUS AS STATUS,
|
||||
procedureoffline.create_time AS create_time,
|
||||
|
||||
Reference in New Issue
Block a user