opt:优化
This commit is contained in:
@@ -180,6 +180,7 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
|
||||
List<Sectattr> sectattrList = sectattrMapper.selectList(new LambdaQueryWrapper<>(Sectattr.class)
|
||||
.select(Sectattr::getSect_id,Sectattr::getSect_name)
|
||||
.ne(Sectattr::getSect_type_attr,"09")
|
||||
.eq(StrUtil.isNotEmpty(stor_jo.getStor_id()),Sectattr::getStor_id,stor_jo.getStor_id())
|
||||
.eq(StrUtil.isNotEmpty(sect_type_attr),Sectattr::getSect_type_attr,sect_type_attr)
|
||||
.eq(Sectattr::getIs_delete,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
|
||||
@@ -21,6 +21,7 @@ public class AcsTaskDto {
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
private String floor_code;
|
||||
|
||||
/**
|
||||
* 取货点1
|
||||
|
||||
@@ -69,6 +69,8 @@ public class StOutTask extends AbstractTask {
|
||||
AcsTaskDto acsTaskDto = new AcsTaskDto();
|
||||
acsTaskDto.setExt_task_uuid(taskDao.getTask_id());
|
||||
acsTaskDto.setTask_code(taskDao.getTask_code());
|
||||
JSONObject param = JSONObject.parseObject(taskDao.getRequest_param());
|
||||
acsTaskDto.setFloor_code(param.getString("floor_code"));
|
||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||
if (taskDao.getPoint_code2().contains("-")) {
|
||||
|
||||
@@ -128,4 +128,6 @@ public class IOStorInvDis implements Serializable {
|
||||
*/
|
||||
private String point_code;
|
||||
|
||||
private String floor_code;
|
||||
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
ioStorInvDisMapper.insert(ioStorInvDis);
|
||||
allocation_canuse_qty = allocation_canuse_qty.add(outAllocation.getFrozen_qty());
|
||||
//分配完成 结束分配
|
||||
unassign_qty=unassign_qty.subtract(allocation_canuse_qty);
|
||||
unassign_qty=unassign_qty.subtract(outAllocation.getFrozen_qty());
|
||||
if (unassign_qty.doubleValue() <= 0){
|
||||
break;
|
||||
}
|
||||
@@ -577,6 +577,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
}
|
||||
for (int i = 0; i < dtls.size(); i++) {
|
||||
IOStorInvDtlDto dtl = dtls.get(i);
|
||||
//未分配数
|
||||
BigDecimal unassign_qty = dtl.getUnassign_qty();
|
||||
String pcsn = dtl.getPcsn();
|
||||
String material_id = dtl.getMaterial_id();
|
||||
@@ -591,7 +592,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
.build()
|
||||
);
|
||||
int seq_no = 1;
|
||||
BigDecimal allocation_canuse_qty=BigDecimal.ZERO;
|
||||
BigDecimal allocation_canuse_qty = BigDecimal.ZERO;
|
||||
for (StrategyStructMaterialVO outAllocation : structMaterials) {
|
||||
//分配明细
|
||||
IOStorInvDis ioStorInvDis = new IOStorInvDis();
|
||||
@@ -632,6 +633,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
//生成分配明细
|
||||
ioStorInvDisMapper.insert(ioStorInvDis);
|
||||
allocation_canuse_qty = allocation_canuse_qty.add(outAllocation.getFrozen_qty());
|
||||
unassign_qty = unassign_qty.subtract(outAllocation.getFrozen_qty());
|
||||
//分配完成 结束分配
|
||||
if (unassign_qty.doubleValue() <= 0){
|
||||
break;
|
||||
@@ -946,10 +948,13 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
public void allSetPoint(JSONObject whereJson) {
|
||||
//出库点
|
||||
String point_code = whereJson.getString("point_code");
|
||||
|
||||
String floor_code = whereJson.getString("floor_code");
|
||||
if (StrUtil.isBlank(point_code)){
|
||||
throw new BadRequestException("未选择出库点");
|
||||
}
|
||||
if (StrUtil.isBlank(floor_code)){
|
||||
throw new BadRequestException("未选择楼层");
|
||||
}
|
||||
String iostorinv_id = whereJson.getString("iostorinv_id");
|
||||
|
||||
//查询主表信息
|
||||
@@ -974,6 +979,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
task_form.put("TaskCode",CodeUtil.getNewCode("TASK_CODE"));
|
||||
task_form.put("PickingLocation", ioStorInvDis.getStruct_code());
|
||||
task_form.put("PlacedLocation", point_code);
|
||||
task_form.put("floor_code",floor_code);
|
||||
task_form.put("vehicle_code", ioStorInvDis.getStoragevehicle_code());
|
||||
|
||||
StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
|
||||
@@ -987,6 +993,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
dis.setTask_id(task_id);
|
||||
dis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("是"));
|
||||
dis.setPoint_code(point_code);
|
||||
dis.setFloor_code(floor_code);
|
||||
ioStorInvDisMapper.updateById(dis);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user