feat: 下发任务等
This commit is contained in:
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
||||||
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.dto.MoveStockInfoDto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移库单据
|
* 移库单据
|
||||||
@@ -18,4 +21,11 @@ public interface IStIvtMoveinvService extends IService<StIvtMoveinv> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<StIvtMoveinv> moveStoragePage(IPage<StIvtMoveinv> pages, MoveInvPageParam param);
|
IPage<StIvtMoveinv> moveStoragePage(IPage<StIvtMoveinv> pages, MoveInvPageParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有载具的库存
|
||||||
|
* @param moveinvId 移库单id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MoveStockInfoDto> getMoveStockInfoByInvId(String moveinvId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package org.nl.b_lms.storage_manage.ios.service.iostorInv;
|
package org.nl.b_lms.storage_manage.ios.service.iostorInv;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinvdtl;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinvdtl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
@@ -13,4 +15,6 @@ import java.util.List;
|
|||||||
public interface IStIvtMoveinvdtlService extends IService<StIvtMoveinvdtl> {
|
public interface IStIvtMoveinvdtlService extends IService<StIvtMoveinvdtl> {
|
||||||
List<StIvtMoveinvdtl> getByMoveInvId(String moveinvId);
|
List<StIvtMoveinvdtl> getByMoveInvId(String moveinvId);
|
||||||
List<JSONObject> getByMoveInvIdToObject(String moveinvId);
|
List<JSONObject> getByMoveInvIdToObject(String moveinvId);
|
||||||
|
|
||||||
|
List<JSONObject> getOutBillDtl(Map whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
||||||
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.dto.MoveStockInfoDto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
@@ -11,4 +14,6 @@ import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
|||||||
*/
|
*/
|
||||||
public interface StIvtMoveinvMapper extends BaseMapper<StIvtMoveinv> {
|
public interface StIvtMoveinvMapper extends BaseMapper<StIvtMoveinv> {
|
||||||
IPage<StIvtMoveinv> moveStoragePageLeft(IPage<StIvtMoveinv> pages, MoveInvPageParam param);
|
IPage<StIvtMoveinv> moveStoragePageLeft(IPage<StIvtMoveinv> pages, MoveInvPageParam param);
|
||||||
|
|
||||||
|
List<MoveStockInfoDto> getMoveStockInfoByInvId(String moveinvId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,4 +81,25 @@
|
|||||||
AND move.input_time <![CDATA[ <= ]]> #{param.end_time}
|
AND move.input_time <![CDATA[ <= ]]> #{param.end_time}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getMoveStockInfoByInvId" resultType="org.nl.wms.st.instor.service.dto.MoveStockInfoDto">
|
||||||
|
SELECT
|
||||||
|
DISTINCT(task.task_id) AS task_id,
|
||||||
|
dtl.turnout_struct_code AS turnout_struct_code
|
||||||
|
FROM
|
||||||
|
ST_IVT_MoveInvDtl dtl
|
||||||
|
INNER JOIN ST_IVT_MoveInv mst ON mst.moveinv_id = dtl.moveinv_id
|
||||||
|
INNER JOIN SCH_BASE_Task task ON task.task_id = dtl.task_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND mst.bill_status = '10'
|
||||||
|
AND dtl.work_status = '01'
|
||||||
|
AND task.task_status <![CDATA[ < ]]> '05'
|
||||||
|
AND mst.is_delete = '0'
|
||||||
|
AND task.is_delete = '0'
|
||||||
|
<if test="moveinvId != null and moveinvId != ''">
|
||||||
|
AND dtl.moveinv_id = #{moveinvId}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
order by turnout_struct_code DESC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
package org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper;
|
package org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinvdtl;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinvdtl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
* @Date: 2025/7/15
|
* @Date: 2025/7/15
|
||||||
*/
|
*/
|
||||||
public interface StIvtMoveinvdtlMapper extends BaseMapper<StIvtMoveinvdtl> {
|
public interface StIvtMoveinvdtlMapper extends BaseMapper<StIvtMoveinvdtl> {
|
||||||
|
List<JSONObject> getOutBillDtl(Map param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,25 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtMoveinvdtlMapper">
|
<mapper namespace="org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtMoveinvdtlMapper">
|
||||||
|
|
||||||
|
<select id="getOutBillDtl" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT
|
||||||
|
MoveInvDtl.*,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name
|
||||||
|
FROM
|
||||||
|
ST_IVT_MoveInvDtl MoveInvDtl
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = MoveInvDtl.material_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
<if test="moveinv_id != null and moveinv_id != ''">
|
||||||
|
AND MoveInvDtl.moveinv_id = #{moveinv_id}
|
||||||
|
</if>
|
||||||
|
<if test="moveinvdtl_id != null and moveinvdtl_id != ''">
|
||||||
|
AND MoveInvDtl.moveinvdtl_id = #{moveinvdtl_id}
|
||||||
|
</if>
|
||||||
|
<if test="work_status != null and work_status != ''">
|
||||||
|
AND MoveInvDtl.work_status <![CDATA[ <= ]]> #{work_status}
|
||||||
|
</if>
|
||||||
|
order by MoveInvDtl.seq_no
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtMoveinvService;
|
|||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtMoveinvMapper;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtMoveinvMapper;
|
||||||
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.dto.MoveStockInfoDto;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
* @Date: 2025/7/2
|
* @Date: 2025/7/2
|
||||||
@@ -20,4 +23,9 @@ public class StIvtMoveinvImpl extends ServiceImpl<StIvtMoveinvMapper, StIvtMovei
|
|||||||
public IPage<StIvtMoveinv> moveStoragePage(IPage<StIvtMoveinv> pages, MoveInvPageParam param) {
|
public IPage<StIvtMoveinv> moveStoragePage(IPage<StIvtMoveinv> pages, MoveInvPageParam param) {
|
||||||
return this.baseMapper.moveStoragePageLeft(pages, param);
|
return this.baseMapper.moveStoragePageLeft(pages, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MoveStockInfoDto> getMoveStockInfoByInvId(String moveinvId) {
|
||||||
|
return this.baseMapper.getMoveStockInfoByInvId(moveinvId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.nl.common.utils.CollectionUtils;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
@@ -39,4 +40,9 @@ public class StIvtMoveinvdtlServiceImpl extends ServiceImpl<StIvtMoveinvdtlMappe
|
|||||||
}
|
}
|
||||||
return CollectionUtils.mapList(getByMoveInvId(moveinvId), p -> (JSONObject) JSON.toJSON(p));
|
return CollectionUtils.mapList(getByMoveInvId(moveinvId), p -> (JSONObject) JSON.toJSON(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<JSONObject> getOutBillDtl(Map whereJson) {
|
||||||
|
return this.baseMapper.getOutBillDtl(whereJson);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package org.nl.b_lms.storage_manage.st.dao.mapper;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dto.StructattrQuerry;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dto.StructattrQuerry;
|
||||||
import org.nl.b_lms.storage_manage.st.dao.StIvtStructattr;
|
import org.nl.b_lms.storage_manage.st.dao.StIvtStructattr;
|
||||||
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.vo.MoveChooseMaterialVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -46,4 +49,8 @@ public interface StIvtStructattrMapper extends BaseMapper<StIvtStructattr> {
|
|||||||
List<StIvtStructattr> getAllOutVehicleStruct(JSONObject whereJson);
|
List<StIvtStructattr> getAllOutVehicleStruct(JSONObject whereJson);
|
||||||
|
|
||||||
JSONArray getVehiclesStorage(List<String> idList);
|
JSONArray getVehiclesStorage(List<String> idList);
|
||||||
|
|
||||||
|
IPage<MoveChooseMaterialVo> getStructIvtPage(IPage<MoveChooseMaterialVo> pages, MoveInvPageParam paramMap);
|
||||||
|
|
||||||
|
JSONArray getVehiclesStorageByCode(String code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -580,5 +580,129 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getStructIvtPage" resultType="org.nl.wms.st.instor.service.vo.MoveChooseMaterialVo">
|
||||||
|
SELECT
|
||||||
|
ivt2.stockrecord_id,
|
||||||
|
ivt2.material_id,
|
||||||
|
ivt2.pcsn,
|
||||||
|
ivt2.quality_scode,
|
||||||
|
ivt2.qty_unit_id,
|
||||||
|
ivt2.ivt_qty AS qty,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name,
|
||||||
|
struct.struct_id AS turnout_struct_id,
|
||||||
|
struct.struct_code AS turnout_struct_code,
|
||||||
|
struct.struct_name AS turnout_struct_name,
|
||||||
|
struct.sect_id AS turnout_sect_id,
|
||||||
|
struct.sect_name AS turnout_sect_name,
|
||||||
|
struct.sect_code AS turnout_sect_code,
|
||||||
|
struct.storagevehicle_id,
|
||||||
|
struct.storagevehicle_code,
|
||||||
|
mu.unit_name AS qty_unit_name,
|
||||||
|
sub.sale_order_name,
|
||||||
|
sub.customer_name,
|
||||||
|
sub.customer_description,
|
||||||
|
sub.sap_pcsn
|
||||||
|
FROM
|
||||||
|
st_ivt_structattr struct
|
||||||
|
INNER JOIN ST_IVT_StructIvt ivt2 ON struct.struct_id = ivt2.struct_id
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt2.material_id
|
||||||
|
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = ivt2.qty_unit_id
|
||||||
|
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = ivt2.pcsn AND sub.package_box_sn = struct.storagevehicle_code
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND struct.lock_type = '1'
|
||||||
|
<if test="paramMap.in_stor_id != null and !paramMap.in_stor_id.isEmpty()">
|
||||||
|
AND struct.stor_id IN
|
||||||
|
<foreach collection="paramMap.in_stor_id" item="code" separator="," open="(" close=")">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.material_id != null and paramMap.material_id !=''">
|
||||||
|
AND ivt2.material_id = #{paramMap.material_id}
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.remark != null and paramMap.remark !=''">
|
||||||
|
AND (mb.material_code LIKE '%${paramMap.remark}%' OR mb.material_name LIKE '%${paramMap.remark}%')
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.ids != null and !paramMap.ids.isEmpty()">
|
||||||
|
AND struct.storagevehicle_code IN
|
||||||
|
<foreach collection="paramMap.ids" item="code" separator="," open="(" close=")">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.struct_code != null and paramMap.struct_code !=''">
|
||||||
|
AND struct.struct_code LIKE '%${paramMap.struct_code}%'
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.stor_id != null and paramMap.stor_id !=''">
|
||||||
|
AND struct.stor_id = #{paramMap.stor_id}
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.sect_id != null and paramMap.sect_id !=''">
|
||||||
|
AND struct.sect_id = #{paramMap.sect_id}
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.pcsn != null and paramMap.pcsn !=''">
|
||||||
|
AND ivt2.pcsn LIKE '%${paramMap.pcsn}%'
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.pcsns != null and !paramMap.pcsns.isEmpty()">
|
||||||
|
AND ivt2.pcsn IN
|
||||||
|
<foreach collection="paramMap.pcsns" item="code" separator="," open="(" close=")">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.sap_pcsn != null and paramMap.sap_pcsn !=''">
|
||||||
|
AND sub.sap_pcsn LIKE '%${paramMap.sap_pcsn}%'
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.sap_pcsns != null and !paramMap.sap_pcsns.isEmpty()">
|
||||||
|
AND sub.sap_pcsn IN
|
||||||
|
<foreach collection="paramMap.sap_pcsns" item="code" separator="," open="(" close=")">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.package_box_sn != null and paramMap.package_box_sn !=''">
|
||||||
|
AND sub.package_box_sn LIKE '%${paramMap.package_box_sn}%'
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.package_box_sns != null and !paramMap.package_box_sns.isEmpty()">
|
||||||
|
AND sub.package_box_sn IN
|
||||||
|
<foreach collection="paramMap.package_box_sns" item="code" separator="," open="(" close=")">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="paramMap.sale_order_name != null and paramMap.sale_order_name !=''">
|
||||||
|
AND sub.sale_order_name LIKE '%${paramMap.sale_order_name}%'
|
||||||
|
</if>
|
||||||
|
ORDER BY ivt2.struct_id
|
||||||
|
</select>
|
||||||
|
<select id="getVehiclesStorageByCode" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT
|
||||||
|
ivt2.stockrecord_id,
|
||||||
|
ivt2.material_id,
|
||||||
|
ivt2.pcsn,
|
||||||
|
ivt2.quality_scode,
|
||||||
|
ivt2.qty_unit_id,
|
||||||
|
mu.unit_name AS qty_unit_name,
|
||||||
|
ivt2.ivt_qty AS qty,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name,
|
||||||
|
struct.struct_id AS turnout_struct_id,
|
||||||
|
struct.struct_code AS turnout_struct_code,
|
||||||
|
struct.struct_name AS turnout_struct_name,
|
||||||
|
struct.sect_id AS turnout_sect_id,
|
||||||
|
struct.sect_name AS turnout_sect_name,
|
||||||
|
struct.sect_code AS turnout_sect_code,
|
||||||
|
struct.storagevehicle_id,
|
||||||
|
struct.storagevehicle_code,
|
||||||
|
point.point_code AS start_point_code
|
||||||
|
FROM
|
||||||
|
st_ivt_structattr struct
|
||||||
|
INNER JOIN ST_IVT_StructIvt ivt2 ON struct.struct_id = ivt2.struct_id
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt2.material_id
|
||||||
|
LEFT JOIN SCH_BASE_Point point ON point.source_id = struct.struct_id
|
||||||
|
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = mb.base_unit_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND struct.lock_type = '1'
|
||||||
|
<if test="code != null and code !=''">
|
||||||
|
AND struct.storagevehicle_code = #{code}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import org.nl.b_lms.storage_manage.st.dao.StIvtStructattr;
|
|||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.wms.basedata.st.service.dto.EmptyVehicleParam;
|
import org.nl.wms.basedata.st.service.dto.EmptyVehicleParam;
|
||||||
import org.nl.wms.basedata.st.service.vo.EmptyVehicleVo;
|
import org.nl.wms.basedata.st.service.vo.EmptyVehicleVo;
|
||||||
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.vo.MoveChooseMaterialVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -84,4 +86,14 @@ public interface StIvtStructattrService extends IService<StIvtStructattr> {
|
|||||||
JSONObject getAttributeByConditionsToObject(LambdaQueryWrapper<StIvtStructattr> structAttyLam, boolean flag);
|
JSONObject getAttributeByConditionsToObject(LambdaQueryWrapper<StIvtStructattr> structAttyLam, boolean flag);
|
||||||
|
|
||||||
JSONArray getVehiclesStorage(List<String> idList);
|
JSONArray getVehiclesStorage(List<String> idList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移库获取分页可移库的物料数据
|
||||||
|
* @param param
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
IPage<MoveChooseMaterialVo> getStructIvtPage(MoveInvPageParam param, PageQuery page);
|
||||||
|
|
||||||
|
JSONArray getVehiclesStorageByCode(String code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import org.nl.b_lms.storage_manage.st.service.StIvtStructattrService;
|
|||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.utils.CollectionUtils;
|
import org.nl.common.utils.CollectionUtils;
|
||||||
import org.nl.wms.basedata.st.service.dto.EmptyVehicleParam;
|
import org.nl.wms.basedata.st.service.dto.EmptyVehicleParam;
|
||||||
import org.nl.wms.basedata.st.service.vo.EmptyVehicleVo;
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
import org.nl.wms.stat.service.vo.PastStructPageVo;
|
import org.nl.wms.st.instor.service.vo.MoveChooseMaterialVo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -116,4 +116,16 @@ public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMappe
|
|||||||
public JSONArray getVehiclesStorage(List<String> idList) {
|
public JSONArray getVehiclesStorage(List<String> idList) {
|
||||||
return this.baseMapper.getVehiclesStorage(idList);
|
return this.baseMapper.getVehiclesStorage(idList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<MoveChooseMaterialVo> getStructIvtPage(MoveInvPageParam param, PageQuery page) {
|
||||||
|
IPage<MoveChooseMaterialVo> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
pages = this.baseMapper.getStructIvtPage(pages, param);
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray getVehiclesStorageByCode(String code) {
|
||||||
|
return this.baseMapper.getVehiclesStorageByCode(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,8 @@ public class HandMoveStorController {
|
|||||||
|
|
||||||
@GetMapping("/getStructIvt")
|
@GetMapping("/getStructIvt")
|
||||||
@Log("查询可分配库存")
|
@Log("查询可分配库存")
|
||||||
|
public ResponseEntity<Object> getStructIvt(MoveInvPageParam whereJson, PageQuery page) {
|
||||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page) {
|
return new ResponseEntity<>(TableDataInfo.build(handMoveStorService.getStructIvt(whereJson, page)), HttpStatus.OK);
|
||||||
return new ResponseEntity<>(handMoveStorService.getStructIvt(whereJson, page), HttpStatus.OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getBoxIvt")
|
@PostMapping("/getBoxIvt")
|
||||||
@@ -73,7 +72,6 @@ public class HandMoveStorController {
|
|||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
@Log("移库单强制确认")
|
@Log("移库单强制确认")
|
||||||
|
|
||||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||||
handMoveStorService.confirm(whereJson);
|
handMoveStorService.confirm(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
@@ -88,7 +86,6 @@ public class HandMoveStorController {
|
|||||||
|
|
||||||
@PostMapping("/handdown")
|
@PostMapping("/handdown")
|
||||||
@Log("移库单手动下发")
|
@Log("移库单手动下发")
|
||||||
|
|
||||||
public ResponseEntity<Object> handdown(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> handdown(@RequestBody JSONObject whereJson) {
|
||||||
handMoveStorService.handdown(whereJson);
|
handMoveStorService.handdown(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.vo.MoveChooseMaterialVo;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -48,7 +49,7 @@ public interface HandMoveStorService {
|
|||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONArray getOutBillDtl(Map whereJson);
|
List<JSONObject> getOutBillDtl(Map whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改出库单
|
* 修改出库单
|
||||||
@@ -70,7 +71,7 @@ public interface HandMoveStorService {
|
|||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getStructIvt(Map whereJson, Pageable page);
|
IPage<MoveChooseMaterialVo> getStructIvt(MoveInvPageParam whereJson, PageQuery page);
|
||||||
|
|
||||||
JSONArray getBoxIvt(JSONArray whereJson);
|
JSONArray getBoxIvt(JSONArray whereJson);
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,23 @@ public class MoveInvPageParam implements Serializable {
|
|||||||
private String bill_code;
|
private String bill_code;
|
||||||
private String stor_id;
|
private String stor_id;
|
||||||
private List<String> stor_ids;
|
private List<String> stor_ids;
|
||||||
|
private List<String> ids;
|
||||||
|
private List<String> pcsns;
|
||||||
|
private List<String> sap_pcsns;
|
||||||
|
private List<String> package_box_sns;
|
||||||
|
private List<String> in_stor_id;
|
||||||
private String bill_status;
|
private String bill_status;
|
||||||
private String material_code;
|
private String material_code;
|
||||||
private String bill_type;
|
private String bill_type;
|
||||||
private String end_time;
|
private String end_time;
|
||||||
private String begin_time;
|
private String begin_time;
|
||||||
private String create_mode;
|
private String create_mode;
|
||||||
|
private String struct_code;
|
||||||
|
private String remark;
|
||||||
|
private String sect_id;
|
||||||
|
private String package_box_sn;
|
||||||
|
private String pcsn;
|
||||||
|
private String sap_pcsn;
|
||||||
|
private String sale_order_name;
|
||||||
|
private String material_id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.nl.wms.st.instor.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移库库存信息
|
||||||
|
* @Author: lyd
|
||||||
|
* @Date: 2025/7/16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MoveStockInfoDto implements Serializable {
|
||||||
|
/** 任务id */
|
||||||
|
private String task_id;
|
||||||
|
/** 转出仓位 */
|
||||||
|
private String turnout_struct_code;
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -17,7 +18,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.b_lms.pdm.storagevehicleext.service.IMdPbStoragevehicleextService;
|
import org.nl.b_lms.pdm.storagevehicleext.service.IMdPbStoragevehicleextService;
|
||||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtMoveinvService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtMoveinvService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtMoveinvdtlService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtMoveinvdtlService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtMoveinv;
|
||||||
@@ -32,11 +32,15 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
import org.nl.system.service.dict.ISysDictService;
|
||||||
|
import org.nl.system.service.dict.dao.Dict;
|
||||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||||
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
import org.nl.wms.st.instor.service.dto.MoveInvPageParam;
|
||||||
|
import org.nl.wms.st.instor.service.dto.MoveStockInfoDto;
|
||||||
|
import org.nl.wms.st.instor.service.vo.MoveChooseMaterialVo;
|
||||||
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
|
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -65,8 +69,10 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
* 任务表
|
* 任务表
|
||||||
*/
|
*/
|
||||||
private final IschBaseTaskService taskService;
|
private final IschBaseTaskService taskService;
|
||||||
|
/** 移库明细表 */
|
||||||
private final IStIvtMoveinvdtlService moveinvdtlService;
|
private final IStIvtMoveinvdtlService moveinvdtlService;
|
||||||
private final IMdPbStoragevehicleextService storagevehicleextService;
|
private final IMdPbStoragevehicleextService storagevehicleextService;
|
||||||
|
private final ISysDictService dictService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<StIvtMoveinv> pageQuery(MoveInvPageParam param, PageQuery page) {
|
public IPage<StIvtMoveinv> pageQuery(MoveInvPageParam param, PageQuery page) {
|
||||||
@@ -423,13 +429,8 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getOutBillDtl(Map whereJson) {
|
public List<JSONObject> getOutBillDtl(Map whereJson) {
|
||||||
whereJson.put("flag", "2");
|
return moveinvdtlService.getOutBillDtl(whereJson);
|
||||||
JSONArray jo = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
|
||||||
.addParamMap((HashMap) whereJson)
|
|
||||||
.process()
|
|
||||||
.getResultJSONArray(0);
|
|
||||||
return jo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -567,88 +568,59 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getStructIvt(Map whereJson, Pageable page) {
|
public IPage<MoveChooseMaterialVo> getStructIvt(MoveInvPageParam map, PageQuery page) {
|
||||||
HashMap<String, String> map = new HashMap<String, String>(whereJson);
|
|
||||||
if (StrUtil.isNotEmpty(map.get("remark"))) {
|
|
||||||
map.put("remark", "%" + map.get("remark") + "%");
|
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(map.get("struct_code"))) {
|
|
||||||
map.put("struct_code", "%" + map.get("struct_code") + "%");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 空格查询
|
// 空格查询
|
||||||
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
|
if (StrUtil.isNotEmpty(map.getPcsn())) {
|
||||||
// 判断是否有空格
|
// 判断是否有空格
|
||||||
String pcsn = MapUtil.getStr(map, "pcsn");
|
String pcsn = map.getPcsn();
|
||||||
|
|
||||||
boolean matches = pcsn.matches(".*\\s.*");
|
boolean matches = pcsn.matches(".*\\s.*");
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
String[] s = pcsn.split(" ");
|
String[] pcsns = pcsn.split(" ");
|
||||||
String pcsn_in = String.join("','", Arrays.asList(s));
|
List<String> pcsnList = new ArrayList<>(Arrays.asList(pcsns));
|
||||||
|
map.setPcsns(pcsnList);
|
||||||
map.put("pcsn_in", "('" + pcsn_in + "')");
|
map.setPcsn("");
|
||||||
map.put("pcsn", "");
|
|
||||||
} else {
|
|
||||||
map.put("pcsn", "%" + map.get("pcsn") + "%");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 空格查询
|
// 空格查询
|
||||||
if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) {
|
if (StrUtil.isNotEmpty(map.getSap_pcsn())) {
|
||||||
// 判断是否有空格
|
// 判断是否有空格
|
||||||
String sap_pcsn = MapUtil.getStr(map, "sap_pcsn");
|
String sap_pcsn = map.getSap_pcsn();
|
||||||
|
|
||||||
boolean matches = sap_pcsn.matches(".*\\s.*");
|
boolean matches = sap_pcsn.matches(".*\\s.*");
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
String[] s = sap_pcsn.split(" ");
|
String[] s = sap_pcsn.split(" ");
|
||||||
String sap_pcsn_in = String.join("','", Arrays.asList(s));
|
List<String> sapList = new ArrayList<>(Arrays.asList(s));
|
||||||
|
map.setSap_pcsns(sapList);
|
||||||
map.put("sap_pcsn_in", "('" + sap_pcsn_in + "')");
|
map.setSap_pcsn("");
|
||||||
map.put("sap_pcsn", "");
|
|
||||||
} else {
|
|
||||||
map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 空格查询
|
// 空格查询
|
||||||
if (StrUtil.isNotEmpty(map.get("package_box_sn"))) {
|
if (StrUtil.isNotEmpty(map.getPackage_box_sn())) {
|
||||||
// 判断是否有空格
|
// 判断是否有空格
|
||||||
String package_box_sn = MapUtil.getStr(map, "package_box_sn");
|
String package_box_sn = map.getPackage_box_sn();
|
||||||
|
|
||||||
boolean matches = package_box_sn.matches(".*\\s.*");
|
boolean matches = package_box_sn.matches(".*\\s.*");
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
String[] s = package_box_sn.split(" ");
|
String[] s = package_box_sn.split(" ");
|
||||||
String box_no_in = String.join("','", Arrays.asList(s));
|
List<String> boxList = new ArrayList<>(Arrays.asList(s));
|
||||||
|
map.setPackage_box_sns(boxList);
|
||||||
map.put("package_box_sn_in", "('" + box_no_in + "')");
|
map.setPackage_box_sn("");
|
||||||
map.put("package_box_sn", "");
|
|
||||||
} else {
|
|
||||||
map.put("package_box_sn", "%" + map.get("package_box_sn") + "%");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotEmpty(map.get("sale_order_name"))) {
|
|
||||||
map.put("sale_order_name", "%" + map.get("sale_order_name") + "%");
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取人员对应的仓库
|
//获取人员对应的仓库
|
||||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
List<String> storIds = bsrealstorattrService.getStoreForUser(SecurityUtils.getCurrentUserId());
|
||||||
String in_stor_id = userStorService.getInStor();
|
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(in_stor_id)) {
|
if (ObjectUtil.isNotEmpty(storIds)) {
|
||||||
map.put("in_stor_id", in_stor_id);
|
map.setIn_stor_id(storIds);
|
||||||
}
|
}
|
||||||
|
return structattrService.getStructIvtPage(map, page);
|
||||||
JSONObject jo = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
|
||||||
.addParam("flag", "3")
|
|
||||||
.addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt2.struct_id");
|
|
||||||
return jo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getBoxIvt(JSONArray whereJson) {
|
public JSONArray getBoxIvt(JSONArray whereJson) {
|
||||||
JSONArray total_rows = new JSONArray();
|
JSONArray total_rows = new JSONArray();
|
||||||
@@ -660,9 +632,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (String s : set) {
|
for (String s : set) {
|
||||||
JSONArray rows = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
JSONArray rows = structattrService.getVehiclesStorageByCode(s);
|
||||||
.addParam("flag", "5")
|
|
||||||
.addParam("storagevehicle_code", s).process().getResultJSONArray(0);
|
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject mater = rows.getJSONObject(i);
|
JSONObject mater = rows.getJSONObject(i);
|
||||||
total_rows.add(mater);
|
total_rows.add(mater);
|
||||||
@@ -674,38 +644,35 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void confirm(JSONObject form) {
|
public void confirm(JSONObject form) {
|
||||||
//明细表
|
// 移库单id
|
||||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_MoveInvDtl");
|
|
||||||
//主表
|
|
||||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
|
|
||||||
//任务表
|
|
||||||
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task");
|
|
||||||
|
|
||||||
String moveinv_id = form.getString("moveinv_id");
|
String moveinv_id = form.getString("moveinv_id");
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
//查询主表信息
|
//查询主表信息
|
||||||
JSONObject jo_mst = wo_mst.query("moveinv_id = '" + moveinv_id + "'").uniqueResult(0);
|
StIvtMoveinv moveOrder = moveinvService.getById(moveinv_id);
|
||||||
if (ObjectUtil.isEmpty(jo_mst)) {
|
if (ObjectUtil.isEmpty(moveOrder)) {
|
||||||
throw new BadRequestException("未查到相关移库单");
|
throw new BadRequestException("未查到相关移库单");
|
||||||
}
|
}
|
||||||
//判断是否存在未确认状态的明细记录
|
//判断是否存在未确认状态的明细记录
|
||||||
JSONObject task = wo_dtl.query("work_status ='02' and moveinv_id = '" + moveinv_id + "'").uniqueResult(0);
|
List<StIvtMoveinvdtl> moveTasks = moveinvdtlService.list(new LambdaUpdateWrapper<StIvtMoveinvdtl>()
|
||||||
if (ObjectUtil.isNotEmpty(task)) {
|
.eq(StIvtMoveinvdtl::getWork_status, "02")
|
||||||
|
.eq(StIvtMoveinvdtl::getMoveinv_id, moveinv_id));
|
||||||
|
if (moveTasks.size() > 0) {
|
||||||
throw new BadRequestException("存在已下发未完成的移库任务,不允许强制确认!");
|
throw new BadRequestException("存在已下发未完成的移库任务,不允许强制确认!");
|
||||||
}
|
}
|
||||||
JSONArray ja = wo_dtl.query("moveinv_id='" + moveinv_id + "'").getResultJSONArray(0);
|
List<JSONObject> ja = moveinvdtlService.getByMoveInvIdToObject(moveinv_id);
|
||||||
for (int i = 0; i < ja.size(); i++) {
|
for (int i = 0; i < ja.size(); i++) {
|
||||||
JSONObject jo = ja.getJSONObject(i);
|
JSONObject jo = ja.get(i);
|
||||||
//删除任务
|
//删除任务
|
||||||
HashMap<String, String> task_map = new HashMap<>();
|
LambdaUpdateWrapper<SchBaseTask> taskUpLam = new LambdaUpdateWrapper<>();
|
||||||
task_map.put("task_status", "07");
|
taskUpLam.set(SchBaseTask::getTask_status, "07")
|
||||||
task_map.put("update_optid", currentUserId + "");
|
.set(SchBaseTask::getUpdate_optid, currentUserId)
|
||||||
task_map.put("update_optname", nickName);
|
.set(SchBaseTask::getUpdate_optname, nickName)
|
||||||
task_map.put("update_time", now);
|
.set(SchBaseTask::getUpdate_time, now)
|
||||||
wo_Task.update(task_map, "task_id='" + jo.getString("task_id") + "'");
|
.eq(SchBaseTask::getTask_id, jo.getString("task_id"));
|
||||||
|
taskService.update(taskUpLam);
|
||||||
//解锁起点点位、仓位,清除载具
|
//解锁起点点位、仓位,清除载具
|
||||||
JSONObject from_start = new JSONObject();
|
JSONObject from_start = new JSONObject();
|
||||||
from_start.put("lock_type", "1");
|
from_start.put("lock_type", "1");
|
||||||
@@ -730,29 +697,27 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
//更新移出库存
|
//更新移出库存
|
||||||
jo.put("struct_id", jo.getString("turnout_struct_id"));
|
jo.put("struct_id", jo.getString("turnout_struct_id"));
|
||||||
jo.put("change_qty", jo.getDoubleValue("qty"));
|
jo.put("change_qty", jo.getDoubleValue("qty"));
|
||||||
jo.put("bill_type_scode", jo_mst.getString("bill_type"));
|
jo.put("bill_type_scode", moveOrder.getBill_type());
|
||||||
jo.put("inv_id", jo.getString("moveinvdtl_id"));
|
jo.put("inv_id", jo.getString("moveinvdtl_id"));
|
||||||
jo.put("bill_code", jo_mst.getString("bill_code"));
|
jo.put("bill_code", moveOrder.getBill_code());
|
||||||
jo.put("bill_table", "ST_IVT_MoveInv");
|
jo.put("bill_table", "ST_IVT_MoveInv");
|
||||||
storPublicService.IOStor(jo, "21");
|
storPublicService.IOStor(jo, "21");
|
||||||
//更新移入库存
|
//更新移入库存
|
||||||
jo.put("struct_id", jo.getString("turnin_struct_id"));
|
jo.put("struct_id", jo.getString("turnin_struct_id"));
|
||||||
jo.put("bill_type_scode", jo_mst.getString("bill_type"));
|
jo.put("bill_type_scode", moveOrder.getBill_type());
|
||||||
jo.put("inv_id", jo.getString("moveinvdtl_id"));
|
jo.put("inv_id", jo.getString("moveinvdtl_id"));
|
||||||
jo.put("bill_code", jo_mst.getString("bill_code"));
|
jo.put("bill_code", moveOrder.getBill_code());
|
||||||
jo.put("bill_table", "ST_IVT_MoveInv");
|
jo.put("bill_table", "ST_IVT_MoveInv");
|
||||||
storPublicService.IOStor(jo, "33");
|
storPublicService.IOStor(jo, "33");
|
||||||
//更新明细
|
//更新明细
|
||||||
jo.put("work_status", "99");
|
jo.put("work_status", "99");
|
||||||
wo_dtl.update(jo);
|
moveinvdtlService.updateById(jo.toJavaObject(StIvtMoveinvdtl.class));
|
||||||
}
|
}
|
||||||
HashMap<String, String> map_mst = new HashMap<>();
|
moveOrder.setBill_status("99");
|
||||||
map_mst.put("bill_status", "99");
|
moveOrder.setUpdate_optid(currentUserId);
|
||||||
map_mst.put("confirm_optid", currentUserId + "");
|
moveOrder.setUpdate_optname(nickName);
|
||||||
map_mst.put("confirm_optname", nickName);
|
moveOrder.setUpdate_time(now);
|
||||||
map_mst.put("confirm_time", now);
|
moveinvService.updateById(moveOrder);
|
||||||
//更新主表状态
|
|
||||||
wo_mst.update(map_mst, "moveinv_id='" + moveinv_id + "'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -948,54 +913,48 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void handdown(JSONObject whereJson) {
|
public void handdown(JSONObject whereJson) {
|
||||||
//移库单主表
|
|
||||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
|
|
||||||
//移库单明细表
|
|
||||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_MoveInvDtl");
|
|
||||||
//任务表
|
|
||||||
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task");
|
|
||||||
//仓位表
|
|
||||||
WQLObject wo_attr = WQLObject.getWQLObject("st_ivt_structattr");
|
|
||||||
|
|
||||||
HandMoveStorAcsTask handMoveStorAcsTask = new HandMoveStorAcsTask();
|
HandMoveStorAcsTask handMoveStorAcsTask = new HandMoveStorAcsTask();
|
||||||
|
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
|
||||||
String moveinv_id = whereJson.getString("moveinv_id");
|
String moveinv_id = whereJson.getString("moveinv_id");
|
||||||
String bill_type = whereJson.getString("bill_type");
|
String bill_type = whereJson.getString("bill_type");
|
||||||
|
|
||||||
//查询所有载具的库存
|
//查询所有载具的库存
|
||||||
JSONArray ja = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
List<MoveStockInfoDto> stockTaskInfo = moveinvService.getMoveStockInfoByInvId(moveinv_id);
|
||||||
.addParam("flag", "4")
|
if (stockTaskInfo.size() == 0) {
|
||||||
.addParam("moveinv_id", moveinv_id)
|
|
||||||
.process().getResultJSONArray(0);
|
|
||||||
if (ja.size() == 0) {
|
|
||||||
throw new BadRequestException("当前移库单无可下发任务!");
|
throw new BadRequestException("当前移库单无可下发任务!");
|
||||||
}
|
}
|
||||||
for (int i = 0; i < ja.size(); i++) {
|
for (int i = 0; i < stockTaskInfo.size(); i++) {
|
||||||
JSONObject jo = ja.getJSONObject(i);
|
MoveStockInfoDto moveStockInfoDto = stockTaskInfo.get(i);
|
||||||
String task_id = jo.getString("task_id");
|
String task_id = moveStockInfoDto.getTask_id();
|
||||||
|
boolean update = taskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
||||||
JSONObject task = wo_Task.query("task_id='" + task_id + "'").uniqueResult(0);
|
.set(SchBaseTask::getTask_status, TaskStatusEnum.START_AND_POINT.getCode())
|
||||||
task.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
.eq(SchBaseTask::getTask_id, task_id));
|
||||||
wo_Task.update(task);
|
log.info("任务-{}更新情况:", task_id, update);
|
||||||
|
// 下发任务
|
||||||
JSONObject result = handMoveStorAcsTask.immediateNotifyAcs(task_id);
|
JSONObject result = handMoveStorAcsTask.immediateNotifyAcs(task_id);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
String status = result.getString("status");
|
String status = result.getString("status");
|
||||||
if ("200".equals(status)) {
|
if ("200".equals(status)) {
|
||||||
HashMap<String, String> map = new HashMap<>();
|
// 下发成功
|
||||||
//更新分配表
|
//更新分配表
|
||||||
map.put("is_issued", "1");
|
LambdaUpdateWrapper<StIvtMoveinvdtl> moveDtlUpLam = new LambdaUpdateWrapper<>();
|
||||||
map.put("work_status", "02");
|
moveDtlUpLam.set(StIvtMoveinvdtl::getIs_issued, "1")
|
||||||
wo_dtl.update(map, "is_issued='0' and task_id='" + task.getString("task_id") + "'");
|
.set(StIvtMoveinvdtl::getWork_status, "02")
|
||||||
|
.eq(StIvtMoveinvdtl::getIs_issued, "0")
|
||||||
|
.eq(StIvtMoveinvdtl::getTask_id, task_id);
|
||||||
|
moveinvdtlService.update(moveDtlUpLam);
|
||||||
//更新任务为已下发
|
//更新任务为已下发
|
||||||
map.put("task_status", "05");
|
LambdaUpdateWrapper<SchBaseTask> taskUpLam = new LambdaUpdateWrapper<>();
|
||||||
map.put("update_optid", currentUserId + "");
|
taskUpLam.set(SchBaseTask::getTask_status, "05")
|
||||||
map.put("update_optname", nickName);
|
.set(SchBaseTask::getUpdate_optid, currentUserId)
|
||||||
map.put("update_time", now);
|
.set(SchBaseTask::getUpdate_optname, nickName)
|
||||||
wo_Task.update(map, "is_delete ='0' and task_id='" + task_id + "'");
|
.set(SchBaseTask::getUpdate_time, now)
|
||||||
|
.eq(SchBaseTask::getIs_delete, "0")
|
||||||
|
.eq(SchBaseTask::getTask_id, task_id);
|
||||||
|
taskService.update(taskUpLam);
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("任务下发失败,请稍后重试!");
|
throw new BadRequestException("任务下发失败,请稍后重试!");
|
||||||
}
|
}
|
||||||
@@ -1003,14 +962,18 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
throw new BadRequestException("任务下发失败,请稍后重试!");
|
throw new BadRequestException("任务下发失败,请稍后重试!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HashMap<String, String> map = new HashMap<>();
|
// 更新主表状态
|
||||||
map.put("bill_status", "20");
|
LambdaUpdateWrapper<StIvtMoveinv> moveInvUpLam = new LambdaUpdateWrapper<>();
|
||||||
wo_mst.update(map, "moveinv_id='" + moveinv_id + "'");
|
moveInvUpLam.set(StIvtMoveinv::getBill_code, "20")
|
||||||
|
.eq(StIvtMoveinv::getMoveinv_id, moveinv_id);
|
||||||
|
moveinvService.update(moveInvUpLam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getInvTypes() {
|
public JSONArray getInvTypes() {
|
||||||
//查询单据字段类型
|
//查询单据字段类型
|
||||||
|
// List<Dict> list = dictService.list(new QueryWrapper<Dict>().select("max(value) AS CODE",
|
||||||
|
// "max(label) AS NAME").like("code", "INV_TYPE").orderByAsc("value"));
|
||||||
JSONArray ja = WQL.getWO("ST_PUB_QUERY_01")
|
JSONArray ja = WQL.getWO("ST_PUB_QUERY_01")
|
||||||
.addParam("flag", "4")
|
.addParam("flag", "4")
|
||||||
.process()
|
.process()
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package org.nl.wms.st.instor.service.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移库单库存物料选择
|
||||||
|
* @Author: lyd
|
||||||
|
* @Date: 2025/7/16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MoveChooseMaterialVo implements Serializable {
|
||||||
|
private String stockrecord_id;
|
||||||
|
private String material_id;
|
||||||
|
private String pcsn;
|
||||||
|
private String quality_scode;
|
||||||
|
private String qty_unit_id;
|
||||||
|
private String qty;
|
||||||
|
private String material_code;
|
||||||
|
private String material_name;
|
||||||
|
private String turnout_struct_id;
|
||||||
|
private String turnout_struct_code;
|
||||||
|
private String turnout_struct_name;
|
||||||
|
private String turnout_sect_id;
|
||||||
|
private String turnout_sect_name;
|
||||||
|
private String turnout_sect_code;
|
||||||
|
private String storagevehicle_id;
|
||||||
|
private String storagevehicle_code;
|
||||||
|
private String qty_unit_name;
|
||||||
|
private String sale_order_name;
|
||||||
|
private String customer_name;
|
||||||
|
private String customer_description;
|
||||||
|
private String sap_pcsn;
|
||||||
|
}
|
||||||
@@ -140,17 +140,17 @@
|
|||||||
>
|
>
|
||||||
强制确认
|
强制确认
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
slot="right"
|
<!-- slot="right"-->
|
||||||
class="filter-item"
|
<!-- class="filter-item"-->
|
||||||
type="warning"
|
<!-- type="warning"-->
|
||||||
icon="el-icon-check"
|
<!-- icon="el-icon-check"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:loading="checkReturnLoading"
|
<!-- :loading="checkReturnLoading"-->
|
||||||
@click="checkReturn"
|
<!-- @click="checkReturn"-->
|
||||||
>
|
<!-- >-->
|
||||||
盘点回库
|
<!-- 盘点回库-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
@@ -187,13 +187,13 @@
|
|||||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :formatter="stateFormat" prop="bill_status" label="单据状态" :min-width="flexWidth('bill_status',crud.data,'单据状态')"/>
|
<el-table-column :formatter="stateFormat" prop="bill_status" label="单据状态" :min-width="flexWidth('bill_status',crud.data,'单据状态')" />
|
||||||
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')"/>
|
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')" />
|
||||||
<el-table-column prop="bill_type" :formatter="bill_typeFormat" label="业务类型" :min-width="flexWidth('bill_type',crud.data,'业务类型')"/>
|
<el-table-column prop="bill_type" :formatter="bill_typeFormat" label="业务类型" :min-width="flexWidth('bill_type',crud.data,'业务类型')" />
|
||||||
<el-table-column prop="biz_date" label="业务日期" :min-width="flexWidth('biz_date',crud.data,'业务日期')"/>
|
<el-table-column prop="biz_date" label="业务日期" :min-width="flexWidth('biz_date',crud.data,'业务日期')" />
|
||||||
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" :min-width="flexWidth('create_mode',crud.data,'生成方式')"/>
|
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" :min-width="flexWidth('create_mode',crud.data,'生成方式')" />
|
||||||
<el-table-column label="明细数" prop="detail_count" :min-width="flexWidth('detail_count',crud.data,'明细数')"/>
|
<el-table-column label="明细数" prop="detail_count" :min-width="flexWidth('detail_count',crud.data,'明细数')" />
|
||||||
<el-table-column prop="input_time" label="创建日期" :min-width="flexWidth('input_time',crud.data,'创建日期')"/>
|
<el-table-column prop="input_time" label="创建日期" :min-width="flexWidth('input_time',crud.data,'创建日期')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -310,7 +310,7 @@ export default {
|
|||||||
this.buttonChange(row)
|
this.buttonChange(row)
|
||||||
} else if (val.length === 1) {
|
} else if (val.length === 1) {
|
||||||
this.buttonChange(row)
|
this.buttonChange(row)
|
||||||
}else{
|
} else {
|
||||||
this.handleCurrentChange(null)
|
this.handleCurrentChange(null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -374,6 +374,7 @@ export default {
|
|||||||
this.handleCurrentChange(null)
|
this.handleCurrentChange(null)
|
||||||
},
|
},
|
||||||
checkReturn() {
|
checkReturn() {
|
||||||
|
// 一期
|
||||||
this.checkReturnLoading = true
|
this.checkReturnLoading = true
|
||||||
handmovestor.checkReturn().then(res => {
|
handmovestor.checkReturn().then(res => {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user