rev:测试修改

This commit is contained in:
2026-01-08 15:55:28 +08:00
parent 4f0bf0e727
commit ebbfa976c4
9 changed files with 148 additions and 110 deletions

View File

@@ -173,7 +173,7 @@
<where>
ex.material_id = #{material_id}
AND
st.lock_type = 0
st.lock_type IN ('0','2')
<if test="pcsn!= null and pcsn!= ''">
AND
ex.pcsn = #{pcsn}
@@ -205,7 +205,7 @@
AND
ex.canuse_qty > 0
AND
st.lock_type = 0
st.lock_type IN ('0','2')
<if test="pcsn!= null and pcsn!= ''">
AND
ex.pcsn = #{pcsn}

View File

@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
@@ -48,6 +49,13 @@ public class PdaUpdatePointServiceImpl implements PdaPublicInterfaceService {
new QueryWrapper<SchBaseRegion>().lambda()
.eq(ObjectUtil.isNotEmpty(region_code), SchBaseRegion::getRegion_code, region_code)
);
return PdaResponse.requestParamOk(regionList);
List<JSONObject> collect = regionList.stream()
.map(row -> JSONObject.parseObject(JSONObject.toJSONString(row), JSONObject.class))
.collect(Collectors.toList());
collect.forEach(item -> {
item.put("text", item.getString("region_name"));
item.put("value", item.getString("region_code"));
});
return PdaResponse.requestParamOk(collect);
}
}

View File

@@ -179,12 +179,20 @@ public class PdaWarehouseServiceImpl implements PdaWarehouseService {
public PdaResponse queryReceiveSect() {
List<Sectattr> sectList = sectattrService.list(
new QueryWrapper<Sectattr>().lambda()
.eq(Sectattr::getStor_id, IOSEnum.STOR_ID.code("物料室仓库"))
.in(Sectattr::getStor_id, IOSEnum.STOR_ID.code("物料室仓库"),IOSEnum.STOR_ID.code("内包材仓库"))
.eq(Sectattr::getIs_delete, IOSConstant.ZERO)
.eq(Sectattr::getIs_used, IOSConstant.ONE)
);
return PdaResponse.requestParamOk(sectList);
List<JSONObject> collect = sectList.stream()
.map(row -> JSONObject.parseObject(JSONObject.toJSONString(row), JSONObject.class))
.collect(Collectors.toList());
collect.forEach(item -> {
item.put("text", item.getString("sect_name"));
item.put("value", item.getString("sect_code"));
});
return PdaResponse.requestParamOk(collect);
}
@Override

View File

@@ -76,7 +76,10 @@ public class PdaPackagingServiceImpl implements PdaPackagingService {
if (ObjectUtil.isEmpty(pointDao)) {
throw new BadRequestException("当前点位不存在!【" + whereJson.getString("point_code") + "");
}
return pdaPublicInterfaceService.queryRegionDropdown(JSONObjectOf.of("region", pointDao.getRegion_code()));
JSONObject jsonObject = new JSONObject();
jsonObject.put("region_code",pointDao.getRegion_code());
return pdaPublicInterfaceService.queryRegionDropdown(jsonObject);
}
@Override
@@ -170,7 +173,14 @@ public class PdaPackagingServiceImpl implements PdaPackagingService {
.eq(SchBasePoint::getRegion_code, IOSEnum.REGION_CODE.code("外包材区域"))
.eq(SchBasePoint::getIs_used, IOSConstant.ONE)
);
return PdaResponse.requestParamOk(pointDaoList);
List<JSONObject> collect = pointDaoList.stream()
.map(row -> JSONObject.parseObject(JSONObject.toJSONString(row), JSONObject.class))
.collect(Collectors.toList());
collect.forEach(item -> {
item.put("text", item.getString("point_name"));
item.put("value", item.getString("point_code"));
});
return PdaResponse.requestParamOk(collect);
}
@Override

View File

@@ -28,7 +28,7 @@ import javax.annotation.Resource;
/**
* <p>
* 包材送入任务类
* 包材送入任务类
* </p>
*
* @author Liuxy
@@ -122,9 +122,7 @@ public class PackagingMiddleTask extends AbstractTask {
if (ObjectUtil.isEmpty(taskObj)) {
throw new BadRequestException("该任务不存在");
}
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setRemark("已完成");
taskService.updateById(taskObj);
this.finishTask(taskObj);
}
@Override
@@ -150,8 +148,8 @@ public class PackagingMiddleTask extends AbstractTask {
// 跟更新库存点位
iMdPdmPackagingService.update(
new UpdateWrapper<MdPdmPackaging>().lambda()
.set(MdPdmPackaging::getPoint_code, taskObj.getPoint_code3())
.eq(MdPdmPackaging::getPoint_code, taskObj.getPoint_code1())
.set(MdPdmPackaging::getPoint_code, taskObj.getPoint_code3())
);
}

View File

@@ -82,7 +82,7 @@ public enum IOSEnum {
PLACEMENT_TYPE(MapOf.of("深货位", "1", "浅货位", "2")),
// 仓库ID
STOR_ID(MapOf.of("物料室仓库", "1582991156504039424")),
STOR_ID(MapOf.of("物料室仓库", "1582991156504039424","内包材仓库","1582991156504039425")),
// 库区编码
SECT_CODE(MapOf.of("合格区", "HG01", "待检区", "DJ01", "不合格区", "BHG01", "大料箱区", "DLX01")),

View File

@@ -100,7 +100,7 @@
md_pb_groupplate late
INNER JOIN md_me_materialbase mater ON mater.material_id = late.material_id
INNER JOIN md_cs_supplierbase supp ON supp.supp_code = late.supp_code
INNER JOIN md_pb_classstandard class ON class.class_id = mater.material_type_id
LEFT JOIN md_pb_classstandard class ON class.class_id = mater.material_type_id
<where>
late.status = '1'

View File

@@ -109,10 +109,10 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
GroupPlate groupPlate = tableData.get(0);
boolean is_like = tableData.stream()
.allMatch(row -> row.getMaterial_id().equals(groupPlate.getMaterial_id()));
}
if (!is_yl) {
if (!is_like) {
throw new BadRequestException("原料组盘物料必须相同!");
}
}
List<GroupPlate> createList = tableData.stream()
.filter(row -> row.getStatus().equals(IOSEnum.GROUP_PLATE_STATUS.code("生成")))

View File

@@ -1095,6 +1095,10 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
@Override
@Transactional
public void createTask(IOStorInvDis ioStorInvDis, String point_code, IOStorInv ioStorInv) {
IOStorInvDis newDis = ioStorInvDisMapper.selectById(ioStorInvDis.getIostorinvdis_id());
if (newDis.getWork_status().equals(IOSEnum.INBILL_DIS_STATUS.code("生成"))) {
return;
}
//创建任务
JSONObject task_form = new JSONObject();
task_form.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
@@ -1112,15 +1116,23 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
AbstractTask task = taskFactory.getTask(IOSEnum.OUT_CONFIG_CODE.code(ioStorInv.getBill_type()));
String task_id = task.create(task_form);
// 查询单据下是否有相同载具
List<IOStorInvDis> disList = ioStorInvDisMapper.selectList(
new QueryWrapper<IOStorInvDis>().lambda()
.eq(IOStorInvDis::getIostorinv_id, ioStorInv.getIostorinv_id())
.eq(IOStorInvDis::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
.eq(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("未生成"))
);
for (IOStorInvDis dis : disList) {
//分配明细表更新任务相关数据
IOStorInvDis dis = new IOStorInvDis();
dis.setIostorinvdis_id(ioStorInvDis.getIostorinvdis_id());
dis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
dis.setTask_id(task_id);
dis.setIs_issued(BaseDataEnum.IS_YES_NOT.code(""));
dis.setPoint_code(point_code);
ioStorInvDisMapper.updateById(dis);
}
}
@Override
public List<JSONObject> getCanuseSpecifiedIvt(Map param) {
@@ -1263,15 +1275,16 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectOne(new LambdaQueryWrapper<>(IOStorInvDis.class)
List<IOStorInvDis> disList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<>(IOStorInvDis.class)
.eq(IOStorInvDis::getTask_id, task.getTask_id())
);
if (ObjectUtil.isEmpty(ioStorInvDis)) {
if (ObjectUtil.isEmpty(disList)) {
throw new BadRequestException("未找到任务对应的分配明细");
}
//查询主表信息
IOStorInv ioStorInv = ioStorInvMapper.selectById(ioStorInvDis.getIostorinv_id());
IOStorInv ioStorInv = ioStorInvMapper.selectById(disList.get(0).getIostorinv_id());
for (IOStorInvDis ioStorInvDis : disList) {
//查询明细信息
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
if (ObjectUtil.isEmpty(ioStorInvDtl)) {
@@ -1362,6 +1375,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
}
}
}
}
@Override
public List<Map<String, Object>> getIoDisDtl(JSONObject param) {