add:手持组盘休息,出库分配库区修改
This commit is contained in:
@@ -25,6 +25,7 @@ import org.nl.wms.basedata_manage.service.dao.SectattrDto;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.BsrealStorattrMapper;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -161,6 +162,11 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
String is_reversed = (String) whereJson.get("is_reversed");
|
||||
String sect_type_attr = (String) whereJson.get("sect_type_attr");
|
||||
String stor_id = (String) whereJson.get("stor_id");
|
||||
String bill_type = (String) whereJson.get("bill_type");
|
||||
|
||||
if (ObjectUtil.isEmpty(bill_type)) {
|
||||
bill_type = "";
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<BsrealStorattr> queryWrapper = new LambdaQueryWrapper<>(BsrealStorattr.class)
|
||||
.select(BsrealStorattr::getStor_id, BsrealStorattr::getStor_code, BsrealStorattr::getStor_name)
|
||||
@@ -189,6 +195,16 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
.eq(StrUtil.isNotEmpty(sect_type_attr),Sectattr::getSect_type_attr,sect_type_attr)
|
||||
.eq(Sectattr::getIs_delete,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(Sectattr::getIs_used, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
.in(bill_type.equals(IOSEnum.OUT_BILL_TYPE.code("领料出库")),Sectattr::getSect_code,
|
||||
IOSEnum.SECT_CODE.code("合格区"),IOSEnum.SECT_CODE.code("大料箱区")
|
||||
)
|
||||
.in(bill_type.equals(IOSEnum.OUT_BILL_TYPE.code("烘干出库")),Sectattr::getSect_code,
|
||||
IOSEnum.SECT_CODE.code("合格区"),IOSEnum.SECT_CODE.code("大料箱区")
|
||||
)
|
||||
.in(bill_type.equals(IOSEnum.OUT_BILL_TYPE.code("退货出库")),Sectattr::getSect_code,
|
||||
IOSEnum.SECT_CODE.code("待检区"),IOSEnum.SECT_CODE.code("大料箱区"),
|
||||
IOSEnum.SECT_CODE.code("不合格区")
|
||||
)
|
||||
);
|
||||
|
||||
if (!sectattrList.isEmpty()) {
|
||||
|
||||
@@ -46,4 +46,11 @@ public class PdaInGroupBoxController {
|
||||
return new ResponseEntity<>(pdaInGroupBoxService.deliveryBox(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryPcsn")
|
||||
@Log("入库组盘查询组盘批次下拉框")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryPcsn() {
|
||||
return new ResponseEntity<>(pdaInGroupBoxService.queryPcsn(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,4 +47,10 @@ public interface PdaInGroupBoxService {
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse deliveryBox(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 入库组盘查询组盘批次下拉框
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryPcsn();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
@@ -11,12 +12,17 @@ import org.nl.wms.pda.general_management.service.PdaInGroupBoxService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.pdm_manage.service.IPdmBomCallMaterialService;
|
||||
import org.nl.wms.pdm_manage.service.dao.PdmBomCallMaterial;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板入库组箱 实现类
|
||||
@@ -97,4 +103,35 @@ public class PdaInGroupBoxServiceImpl implements PdaInGroupBoxService {
|
||||
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse queryPcsn() {
|
||||
List<GroupPlate> groupDaoList = iMdPbGroupplateService.list(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.in(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"),
|
||||
IOSEnum.GROUP_PLATE_STATUS.code("入库")
|
||||
)
|
||||
.orderByDesc(GroupPlate::getCreate_time)
|
||||
);
|
||||
List<String> pcsnList = groupDaoList.stream()
|
||||
.map(GroupPlate::getPcsn)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (pcsnList.size() > 10) {
|
||||
pcsnList = pcsnList.subList(0, 10);
|
||||
} else {
|
||||
pcsnList = pcsnList.subList(0, pcsnList.size());
|
||||
}
|
||||
|
||||
List<JSONObject> resultList = new ArrayList<>();
|
||||
pcsnList.forEach(row -> {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("label", row);
|
||||
json.put("value", row);
|
||||
resultList.add(json);
|
||||
});
|
||||
|
||||
return PdaResponse.requestParamOk(resultList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId, 'bill_type': this.rowmst.bill_type }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user