fix 更新

This commit is contained in:
zhoujj
2026-03-17 14:15:20 +08:00
parent d0c14a6b58
commit a1941577f0
14 changed files with 101 additions and 24 deletions

View File

@@ -152,8 +152,18 @@ public class AutoCreateInst {
flag = true;
}
}
} else if (start_point.equals("BCPRK5")) {
List<TaskDto> list1 = taskserver.queryAllByStatus("1");
for (int j = 0; j < list1.size(); j++) {
String start_device_code1 = list1.get(j).getStart_device_code();
String[] parts = start_device_code1.split("-", 2);
start_point = parts[0];
if (start_point.equals("BCPRK5")) {
flag = true;
}
}
}
}
if (flag){
continue;
}

View File

@@ -225,8 +225,11 @@ public class Structattr implements Serializable {
private String ext_id;
/**
* 备注
* 关联货位1
*/
private String remark;
/**
* 关联货位2
*/
private String remark1;
}

View File

@@ -17,4 +17,6 @@ public interface StructattrMapper extends BaseMapper<Structattr>{
List<StructattrVechielDto> collectVehicle(Map query);
List<Structattr> getctnextcode();
}

View File

@@ -56,4 +56,30 @@
</if>
</where>
</select>
<select id="getctnextcode" resultType="org.nl.wms.basedata_manage.service.dao.Structattr">
SELECT
main.*
FROM (
SELECT
s.*
FROM st_ivt_structattr s
WHERE s.stor_type = '1'
<!-- 注释掉的is_used条件保留如需启用可取消注释 -->
AND s.is_used = 1
-- 校验remark对应的记录storagevehicle_code为空
AND EXISTS (
SELECT 1 FROM st_ivt_structattr
WHERE struct_code = s.remark AND storagevehicle_code IS NULL
AND is_used = 1
)
-- 校验remark1对应的记录storagevehicle_code为空
AND EXISTS (
SELECT 1 FROM st_ivt_structattr
WHERE struct_code = s.remark1 AND storagevehicle_code IS NULL
AND is_used = 1
)
-- 按创建时间排序,保证取第一条符合条件的记录
ORDER BY s.create_time ASC
) main
</select>
</mapper>

View File

@@ -48,6 +48,9 @@ public class StrategyStructParam {
* 载具明细:混料的话则是数组
*/
private List<StrategyMater> strategyMaters;
/**
* 载具类型
*/
private String storagevehicle_type;
}

View File

@@ -94,7 +94,7 @@ public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStorageve
entity.setCreate_time(DateUtil.now());
entity.setCreate_id(SecurityUtils.getCurrentUserId());
entity.setIs_used(vehicleInfo.getIs_used());
entity.setStoragevehicle_type(mdPbStoragevehicletype.getStoragevehicle_btype());
entity.setStoragevehicle_type(dto.getString("storagevehicle_type"));
entity.setVehicle_height(vehicleInfo.getVehicle_height());
entity.setVehicle_width(vehicleInfo.getVehicle_width());
entity.setVehicle_long(vehicleInfo.getVehicle_long());

View File

@@ -359,11 +359,12 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
List<String> strategy = one.getStrategy();
Map<String, Decisioner> decisionerMap = SpringContextHolder.getBeansOfType(Decisioner.class);
QueryWrapper<Structattr> query = new QueryWrapper<Structattr>();
if ("3".equals(param.getSuitable_car())) {
if ("3".equals(param.getSuitable_car())) {
query.eq("is_used", true)
.eq("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"))
.eq("sect_code", param.getSect_code())
.ne("width",1)
.isNull( "width")
.ne("stor_type",1)
.and(wrapper -> wrapper.isNull("storagevehicle_code")
.or()
.eq("storagevehicle_code", " "));
@@ -373,6 +374,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
.eq("sect_code", param.getSect_code())
.eq("width",1)
.ne("layer_num",4)
.ne("stor_type",1)
.and(wrapper -> wrapper.isNull("storagevehicle_code")
.or()
.eq("storagevehicle_code", " "));
@@ -381,11 +383,16 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
.eq("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"))
.eq("sect_code", param.getSect_code())
.eq("layer_num",4)
.ne("stor_type",1)
.and(wrapper -> wrapper.isNull("storagevehicle_code")
.or()
.eq("storagevehicle_code", " "));
}
List<Structattr> list = this.list(query);
if("BCPCTZB".equals(param.getStoragevehicle_type())){
list=structattrMapper.getctnextcode();
}
for (String decisionerType : strategy) {
Decisioner decisioner = decisionerMap.get(decisionerType);
log.info("执行入库规格:"+decisioner.strategyConfig.getStrategy_name());

View File

@@ -41,7 +41,12 @@ public class SchBaseRegionController {
regionService.create(entity);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PostMapping("/relse")
@Log("释放出库区域")
public ResponseEntity<Object> relse() {
regionService.relse();
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping
@Log("修改区域管理")
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseRegion entity) {

View File

@@ -46,6 +46,12 @@ public interface ISchBaseRegionService extends IService<SchBaseRegion> {
* @param ids /
*/
void deleteAll(Set<String> ids);
/**
* 释放出库区域
*
*
*/
void relse();
/**
* 区域下拉框

View File

@@ -635,6 +635,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
.sect_code(param.getString("sect_code"))
.stor_code(param.getString("stor_code"))
.storagevehicle_code(param.getString("storagevehicle_code"))
.storagevehicle_type(param.getString("storagevehicle_type"))
.suitable_car(suitable_car)
.strategyMaters(maters)
.build());

View File

@@ -21,12 +21,10 @@ import org.nl.common.utils.IdUtil;;
import org.nl.config.SpringContextHolder;
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicletypeService;
import org.nl.wms.basedata_manage.service.IStructattrService;
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicletype;
import org.nl.wms.basedata_manage.service.dao.Structattr;
import org.nl.wms.basedata_manage.service.dao.*;
import org.nl.wms.basedata_manage.service.dao.mapper.MdMeMaterialbaseMapper;
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
import org.nl.wms.basedata_manage.service.dto.*;
@@ -54,6 +52,7 @@ import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
import org.nl.wms.warehouse_manage.service.dao.mapper.MdPbGroupplateMapper;
import org.nl.wms.wbwms.service.IWmsToWmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@@ -86,6 +85,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
*/
@Resource
private MdPbStoragevehicleextMapper mdPbStoragevehicleextMapper;
@Resource
private IMdPbStoragevehicleinfoService iMdPbStoragevehicleinfoService;
/**
* 任务服务
@@ -1184,7 +1185,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
structattr=iStructattrService.getByCode(struct_code);
if(structattr.getLayer_num().equals(4)){
car_type="2";
String storagevehicle_stype=(String) whereJson.get("storagevehicle_type");
String storagevehicle_code=structattr.getStoragevehicle_code();
MdPbStoragevehicleinfo mdPbStoragevehicleinfo=iMdPbStoragevehicleinfoService.getByCode(storagevehicle_code);
String storagevehicle_stype=mdPbStoragevehicleinfo.getStoragevehicle_type();
MdPbStoragevehicletype mdPbStoragevehicletype=iMdPbStoragevehicletypeService.getByCode(storagevehicle_stype);
car_width=mdPbStoragevehicletype.getCar_width();
}else{

View File

@@ -268,12 +268,13 @@ public class WmsToIWmsServiceImpl implements WmsToIWmsService {
parm.put("point_code",stuct_code);
parm.put("region_code","CKQ");
iOutBillService.allSetPoint(parm);
JSONObject data=new JSONObject();
// data.put("bill_code",iostorinv_id);
// data.put("turnout_destination_code",pointCode);
result.setCode(String.valueOf(HttpStatus.OK.value()));
result.setMsg("出库任务生成成功");
result.setTotalElements(0);
JSONObject data=new JSONObject();
result.setData(data);
log.info("WMS出库返回参数参数为-------------------" + result.toString());
return result;

View File

@@ -122,16 +122,16 @@
>
启用
</el-button>
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- size="mini"-->
<!-- type="warning"-->
<!-- icon="el-icon-circle-close"-->
<!-- :loading="downloadLoading"-->
<!-- @click="doExport1"-->
<!-- >一键解锁出库点-->
<!-- </el-button>-->
<el-button
slot="right"
class="filter-item"
size="mini"
type="warning"
icon="el-icon-circle-close"
:loading="downloadLoading"
@click="relse"
>一键解锁出库点
</el-button>
<el-button
v-if="crud.query.is_used == 'true'"
slot="right"
@@ -513,6 +513,9 @@ export default {
}
})
},
relse(){
crudSchBaseRegion.relse()
},
getPointTypeList(id, flag) {
crudSchBaseRegion.getPointTypeSelectById(id).then(res => {
if (flag === 1) {
@@ -531,6 +534,7 @@ export default {
this.crud.toQuery()
})
},
showButton(point_status) {
if (point_status && (point_status === '2' || point_status === '3')) {
return true

View File

@@ -47,5 +47,11 @@ export function getPointTypeSelectById(id) {
data: id
})
}
export function relse() {
return request({
url: 'api/schBaseRegion/relse',
method: 'post',
})
}
export default { add, edit, del, getRegionList, getPointStatusSelectById, getPointTypeSelectById }
export default { add, edit, del, getRegionList, getPointStatusSelectById, getPointTypeSelectById, relse }