add:出入库单增加明细载具物料查询;限位策略增加1109过滤1,2列
This commit is contained in:
@@ -2,6 +2,7 @@ package org.nl.wms.decision_manage.handler.decisioner.impl.base;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.stor_manage.io.service.iostor_dtl.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.io.service.iostor_dtl.dao.StIvtIostorinvdtl;
|
||||
@@ -52,6 +53,14 @@ public class LimitStorageRuleHandler extends Decisioner<StIvtStructattr, JSONObj
|
||||
if (vehileInfo==null){
|
||||
throw new BadRequestException("当前载具信息不存在:"+vehicleCode+"!");
|
||||
}
|
||||
//限位策略特殊处理
|
||||
String start_point = param.getString("start_point");
|
||||
if (StringUtils.isNotEmpty(start_point) && start_point.equals("1109")){
|
||||
List<StIvtStructattr> collect = list.stream().filter(struct -> struct.getCol_num() > 2).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(collect)){
|
||||
list = collect;
|
||||
}
|
||||
}
|
||||
List<StIvtStructattr> resultList = inHandler(list,vehileInfo);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,9 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
.set("remark", "入满异常:" + task_code)
|
||||
.set("vehicle_code", task_code+"_ZD_"+org.nl.common.utils.IdUtil.getStringId()));
|
||||
Map map = SpringContextHolder.getBean(DecisionHandler.class)
|
||||
.dispenseTransa(ListOf.of("limitStorage","depthPriority","nearby"), new JSONObject(MapOf.of("stor_code", stIvtStructattr.getStor_code(),"vehicle_code",task.getVehicle_code())));
|
||||
.dispenseTransa(ListOf.of("limitStorage","depthPriority","nearby"), new JSONObject(MapOf.of("stor_code", stIvtStructattr.getStor_code()
|
||||
,"vehicle_code",task.getVehicle_code(),
|
||||
"start_point",task.getPoint_code1())));
|
||||
String new_struct_code = ((Map<String, String>) map.get("form_data")).get("end_struct_code");
|
||||
if (vehicleCode!=null){
|
||||
iActRuExecutionService.update(new UpdateWrapper<ActRuExecution>()
|
||||
|
||||
@@ -40,8 +40,8 @@ public class StIvtIostorinvController {
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> getAll(StorInvQuery query, PageQuery page) {
|
||||
Page<StIvtIostorinv> result = iStIvtIostorinvService.page(page.build(), query.build());
|
||||
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||
TableDataInfo result = iStIvtIostorinvService.pageQuery(query, page);
|
||||
return new ResponseEntity<>(result, HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("delete")
|
||||
@Log("删除入库单")
|
||||
|
||||
@@ -41,8 +41,8 @@ public class StIvtIostorinvOutController {
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> getAll(StorInvQuery query, PageQuery page) {
|
||||
Page<StIvtIostorinv> result = iStIvtIostorinvService.page(page.build(), query.build());
|
||||
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||
TableDataInfo result = iStIvtIostorinvService.pageQuery(query, page);
|
||||
return new ResponseEntity<>(result, HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("delete")
|
||||
@Log("删除出库单")
|
||||
|
||||
@@ -13,6 +13,8 @@ public class StorInvQuery extends BaseQuery<StIvtIostorinv>{
|
||||
private String form_type;
|
||||
private String code;
|
||||
private String status;
|
||||
private String vehicles;
|
||||
private String material;
|
||||
private String bill_type;
|
||||
private Boolean in_storage;
|
||||
private String product_code;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package org.nl.wms.stor_manage.io.service.iostor;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.stor_manage.io.service.dto.StorInvQuery;
|
||||
import org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv;
|
||||
|
||||
/**
|
||||
@@ -40,4 +44,7 @@ public interface IStIvtIostorinvService extends IService<StIvtIostorinv> {
|
||||
String cancelMst(String id);
|
||||
|
||||
void taskOpen(JSONObject form);
|
||||
|
||||
|
||||
TableDataInfo pageQuery(StorInvQuery query, PageQuery page);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,12 @@ package org.nl.wms.stor_manage.io.service.iostor.dao.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.stor_manage.io.service.dto.StorInvQuery;
|
||||
import org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表 Mapper 接口
|
||||
@@ -13,5 +17,5 @@ import org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv;
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
public interface StIvtIostorinvOutMapper extends BaseMapper<StIvtIostorinv> {
|
||||
|
||||
List<StIvtIostorinv> pageQuery(@Param("query") StorInvQuery query);
|
||||
}
|
||||
|
||||
@@ -2,4 +2,46 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.stor_manage.io.service.iostor.dao.mapper.StIvtIostorinvOutMapper">
|
||||
|
||||
<select id="pageQuery" resultType="org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv">
|
||||
SELECT
|
||||
st_ivt_iostorinv.*
|
||||
FROM
|
||||
st_ivt_iostorinv
|
||||
left join st_ivt_iostorinvdtl on st_ivt_iostorinv.id = st_ivt_iostorinvdtl.inv_id
|
||||
LEFT JOIN md_me_materialbase on st_ivt_iostorinvdtl.material_id = md_me_materialbase.material_id
|
||||
<where> st_ivt_iostorinv.id is not null
|
||||
<if test="query.form_type != null and query.form_type != ''">
|
||||
and st_ivt_iostorinv.form_type = #{query.form_type}
|
||||
</if>
|
||||
<if test="query.code != null and query.code != ''">
|
||||
and st_ivt_iostorinv.code = #{query.code}
|
||||
</if>
|
||||
<if test="query.form_type != null and query.form_type != ''">
|
||||
and st_ivt_iostorinv.form_type = #{query.form_type}
|
||||
</if>
|
||||
<if test="query.status != null and query.status != ''">
|
||||
and st_ivt_iostorinv.status = #{query.status}
|
||||
</if>
|
||||
<if test="query.bill_type != null and query.bill_type != ''">
|
||||
and st_ivt_iostorinv.bill_type = #{query.bill_type}
|
||||
</if>
|
||||
<if test="query.in_storage != null and query.in_storage != ''">
|
||||
and st_ivt_iostorinv.in_storage = #{query.in_storage}
|
||||
</if>
|
||||
<if test="query.vehicles != null and query.vehicles != ''">
|
||||
and st_ivt_iostorinvdtl.vehicle_code = #{query.vehicles}
|
||||
</if>
|
||||
<if test="query.material != null and query.material != ''">
|
||||
and (md_me_materialbase.material_spec LIKE '%${query.material}%'
|
||||
or md_me_materialbase.material_name LIKE '%${query.material}%')
|
||||
</if>
|
||||
<if test="query.product_code != null and query.product_code != ''">
|
||||
and st_ivt_iostorinv.product_code = #{query.product_code}
|
||||
</if>
|
||||
<if test="query.source_form_code != null and query.source_form_code != ''">
|
||||
and st_ivt_iostorinv.source_form_code = #{query.source_form_code}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY st_ivt_iostorinv.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -5,7 +5,11 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.publish.BussEventMulticaster;
|
||||
@@ -21,6 +25,7 @@ import org.nl.wms.md_manage.vehicleMater.service.dao.MdPbVehicleMater;
|
||||
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
||||
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
|
||||
import org.nl.wms.pm_manage.form_data.service.dto.PmFormDataDto;
|
||||
import org.nl.wms.stor_manage.io.service.dto.StorInvQuery;
|
||||
import org.nl.wms.stor_manage.io.service.iostor.IStIvtIostorinvService;
|
||||
import org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv;
|
||||
import org.nl.wms.stor_manage.io.service.iostor.dao.mapper.StIvtIostorinvOutMapper;
|
||||
@@ -408,4 +413,13 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo pageQuery(StorInvQuery query, PageQuery pageQuery) {
|
||||
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
List<StIvtIostorinv> iostorinvs = this.baseMapper.pageQuery(query);
|
||||
TableDataInfo build = TableDataInfo.build(iostorinvs);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user