opt:移库单功能wql改成myb-plus
This commit is contained in:
@@ -25,7 +25,7 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.movestor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.nl.wms.sch.tasks.PaperTrussTask;
|
||||
import org.nl.wms.sch.tasks.SendOutTask;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.nl.wms.st.instor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.nl.wms.st.instor.movestor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -70,8 +70,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package org.nl.wms.st.instor.rest;
|
||||
package org.nl.wms.st.instor.movestor.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.movestor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.movestor.service.dto.MoveStorQuery;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -15,7 +18,6 @@ import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@RequestMapping("/api/handmovestor")
|
||||
@Slf4j
|
||||
public class HandMoveStorController {
|
||||
@@ -23,20 +25,17 @@ public class HandMoveStorController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询手工移库单")
|
||||
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(handMoveStorService.pageQuery(whereJson, page), HttpStatus.OK);
|
||||
public ResponseEntity<Object> query(MoveStorQuery whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(handMoveStorService.pageQuery(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getOutBillDtl")
|
||||
@Log("查询移库单")
|
||||
|
||||
@Log("查询移库单明细")
|
||||
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson) {
|
||||
return new ResponseEntity<>(handMoveStorService.getOutBillDtl(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("删除移库单")
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
handMoveStorService.deleteAll(ids);
|
||||
@@ -45,52 +44,39 @@ public class HandMoveStorController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改移库单")
|
||||
|
||||
public ResponseEntity<Object> update(@RequestBody Map whereJson) {
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
||||
handMoveStorService.update(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping()
|
||||
@Log("新增移库单")
|
||||
|
||||
public ResponseEntity<Object> insertDtl(@RequestBody Map whereJson) {
|
||||
public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson) {
|
||||
handMoveStorService.insertDtl(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@GetMapping("/getStructIvt")
|
||||
@Log("查询可分配库存")
|
||||
|
||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(handMoveStorService.getStructIvt(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getBoxIvt")
|
||||
@Log("查询箱内库存")
|
||||
|
||||
public ResponseEntity<Object> getBoxIvt(@RequestBody JSONArray whereJson) {
|
||||
return new ResponseEntity<>(handMoveStorService.getBoxIvt(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirm")
|
||||
@Log("移库单强制确认")
|
||||
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
handMoveStorService.confirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@GetMapping("/getInvTypes")
|
||||
@Log("查询单据字段")
|
||||
|
||||
public ResponseEntity<Object> getInvTypes() {
|
||||
return new ResponseEntity<>(handMoveStorService.getInvTypes(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/handdown")
|
||||
@Log("移库单手动下发")
|
||||
|
||||
public ResponseEntity<Object> handdown(@RequestBody JSONObject whereJson) {
|
||||
handMoveStorService.handdown(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
@@ -98,7 +84,6 @@ public class HandMoveStorController {
|
||||
|
||||
@PostMapping("/checkReturn")
|
||||
@Log("盘点回库")
|
||||
|
||||
public ResponseEntity<Object> checkReturn() {
|
||||
handMoveStorService.checkReturn();
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
@@ -1,12 +1,16 @@
|
||||
package org.nl.wms.st.instor.service;
|
||||
package org.nl.wms.st.instor.movestor.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.st.instor.movestor.service.dao.MoveStor;
|
||||
import org.nl.wms.st.instor.movestor.service.dto.MoveStorQuery;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface HandMoveStorService {
|
||||
public interface HandMoveStorService extends IService<MoveStor> {
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
@@ -14,7 +18,7 @@ public interface HandMoveStorService {
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> pageQuery(Map whereJson, Pageable page);
|
||||
IPage<MoveStor> pageQuery(MoveStorQuery whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
@@ -24,21 +28,21 @@ public interface HandMoveStorService {
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 新增出库单
|
||||
* 新增移库单
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void insertDtl(Map whereJson);
|
||||
void insertDtl(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 新增出库单2
|
||||
* 新增移库单2
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
String insertDtl2(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询出库单明细
|
||||
* 查询出移库单明细
|
||||
*
|
||||
* @param whereJson /
|
||||
* @return
|
||||
@@ -46,18 +50,12 @@ public interface HandMoveStorService {
|
||||
JSONArray getOutBillDtl(Map whereJson);
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
* 修改移库单
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void update(Map whereJson);
|
||||
void update(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 全部取消
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void allCancel(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询可分配库存
|
||||
@@ -67,52 +65,36 @@ public interface HandMoveStorService {
|
||||
*/
|
||||
Map<String, Object> getStructIvt(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询箱内库存
|
||||
* @param whereJson
|
||||
* @return
|
||||
*/
|
||||
JSONArray getBoxIvt(JSONArray whereJson);
|
||||
|
||||
/**
|
||||
* 出库单强制确认
|
||||
* 移库单强制确认
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void confirm(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 出库任务下发
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void issueTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 出库任务手动完成
|
||||
* 移库单任务手动完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void finishTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 出库任务手动取消完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void cancleTaskfinish(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询单据字段
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
JSONArray getInvTypes();
|
||||
|
||||
/**
|
||||
* 移库单手动下发
|
||||
* 移库单任务手动下发
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void handdown(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 盘点回库
|
||||
* 盘点自动回库
|
||||
*/
|
||||
void checkReturn();
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package org.nl.wms.st.instor.movestor.service.dao;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author: zds
|
||||
* @date: 2024-09-27
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_moveinv")
|
||||
public class MoveStor implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "moveinv_id", type = IdType.NONE)
|
||||
private String moveinv_id;
|
||||
//单据编号
|
||||
private String bill_code;
|
||||
//业务类型
|
||||
private String buss_type;
|
||||
//单据类型
|
||||
private String bill_type;
|
||||
//业务日期
|
||||
private String biz_date;
|
||||
//仓库标识
|
||||
private String stor_id;
|
||||
//仓库编码
|
||||
private String stor_code;
|
||||
//仓库名称
|
||||
private String stor_name;
|
||||
//总数量
|
||||
private Double total_qty;
|
||||
//明细数
|
||||
private Integer detail_count;
|
||||
//单据状态
|
||||
private String bill_status;
|
||||
//备注
|
||||
private String remark;
|
||||
//生成方式
|
||||
private String create_mode;
|
||||
//制单人
|
||||
private String input_optid;
|
||||
//制单人姓名
|
||||
private String input_optname;
|
||||
//制单时间
|
||||
private String input_time;
|
||||
//修改人
|
||||
private String update_optid;
|
||||
//修改人姓名
|
||||
private String update_optname;
|
||||
//修改时间
|
||||
private String update_time;
|
||||
//确认人
|
||||
private String confirm_optid;
|
||||
//确认人姓名
|
||||
private String confirm_optname;
|
||||
//确认时间
|
||||
private String confirm_time;
|
||||
//确认说明
|
||||
private String confirm_info;
|
||||
//部门ID
|
||||
private String sysdeptid;
|
||||
//公司ID
|
||||
private String syscompanyid;
|
||||
//是否删除
|
||||
private String is_delete;
|
||||
@TableField(exist = false)
|
||||
private String is_task;
|
||||
|
||||
public void copyFrom(JSONObject source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package org.nl.wms.st.instor.movestor.service.dao;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author: zds
|
||||
* @date: 2024-09-27
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_moveinvdtl")
|
||||
public class MoveStorDtl implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "moveinvdtl_id", type = IdType.NONE)
|
||||
private String moveinvdtl_id;
|
||||
//移库单标识
|
||||
private String moveinv_id;
|
||||
//明细序号
|
||||
private String seq_no;
|
||||
//转出库区标识
|
||||
private String turnout_sect_id;
|
||||
//转出库区编码
|
||||
private String turnout_sect_code;
|
||||
//转出库区名称
|
||||
private String turnout_sect_name;
|
||||
//转出仓位标识
|
||||
private String turnout_struct_id;
|
||||
//转出仓位编码
|
||||
private String turnout_struct_code;
|
||||
//转出仓位名称
|
||||
private String turnout_struct_name;
|
||||
//物料标识
|
||||
private String material_id;
|
||||
//批次
|
||||
private String pcsn;
|
||||
//品质类型
|
||||
private String quality_scode;
|
||||
//数量计量单位标识
|
||||
private String qty_unit_id;
|
||||
//数量计量单位名称
|
||||
private String qty_unit_name;
|
||||
//数量
|
||||
private Double qty;
|
||||
//转入库区标识
|
||||
private String turnin_sect_id;
|
||||
//转入库区编码
|
||||
private String turnin_sect_code;
|
||||
//转入库区名称
|
||||
private String turnin_sect_name;
|
||||
//转入仓位标识
|
||||
private String turnin_struct_id;
|
||||
//转入仓位编码
|
||||
private String turnin_struct_code;
|
||||
//转入仓位名称
|
||||
private String turnin_struct_name;
|
||||
//执行状态
|
||||
private String work_status;
|
||||
//任务标识
|
||||
private String task_id;
|
||||
//存储载具标识
|
||||
private String storagevehicle_id;
|
||||
//存储载具编码
|
||||
private String storagevehicle_code;
|
||||
//是否已下发
|
||||
private String is_issued;
|
||||
//来源单据明细标识
|
||||
private String source_billdtl_id;
|
||||
//来源单据类型
|
||||
private String source_bill_type;
|
||||
//来源单编号
|
||||
private String source_bill_code;
|
||||
//来源单表名
|
||||
private String source_bill_table;
|
||||
//备注
|
||||
private String remark;
|
||||
|
||||
|
||||
public void copyFrom(JSONObject source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.nl.wms.st.instor.movestor.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.st.instor.movestor.service.dao.MoveStor;
|
||||
import org.nl.wms.st.instor.movestor.service.dao.MoveStorDtl;
|
||||
|
||||
/**
|
||||
* @author: zds
|
||||
* @date: 2024-09-27
|
||||
* @description:
|
||||
*/
|
||||
public interface MoveStorDtlMapper extends BaseMapper<MoveStorDtl> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.st.instor.movestor.service.dao.mapper.MoveStorDtlMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.nl.wms.st.instor.movestor.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.wms.st.instor.movestor.service.dao.MoveStor;
|
||||
import org.nl.wms.st.instor.movestor.service.dto.MoveStorQuery;
|
||||
|
||||
/**
|
||||
* @author: zds
|
||||
* @date: 2024-09-27
|
||||
* @description:
|
||||
*/
|
||||
public interface MoveStorMapper extends BaseMapper<MoveStor> {
|
||||
/**
|
||||
* 分页查找
|
||||
* @return
|
||||
*/
|
||||
IPage<MoveStor> pageQuery(IPage<MoveStor> pages, MoveStorQuery query);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.st.instor.movestor.service.dao.mapper.MoveStorMapper">
|
||||
<select id="pageQuery" resultType="org.nl.wms.st.instor.movestor.service.dao.MoveStor">
|
||||
SELECT
|
||||
move.*
|
||||
FROM
|
||||
ST_IVT_MoveInv move
|
||||
WHERE
|
||||
1 = 1
|
||||
AND move.is_delete = '0'
|
||||
AND move.moveinv_id IN (
|
||||
SELECT DISTINCT
|
||||
(movedtl.moveinv_id)
|
||||
FROM
|
||||
st_ivt_moveinvdtl movedtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = movedtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.material_code != null">
|
||||
and (mb.material_code like CONCAT('%', #{query.material_code}, '%') or mb.material_code like CONCAT('%', #{query.material_code}, '%'))
|
||||
</if>
|
||||
)
|
||||
AND move.stor_id in (
|
||||
SELECT DISTINCT
|
||||
userstor.stor_id
|
||||
FROM
|
||||
st_ivt_userstor userstor
|
||||
WHERE 1=1
|
||||
<if test="query.user_id != null">
|
||||
and userstor.user_id = #{query.user_id}
|
||||
</if>
|
||||
)
|
||||
<if test="query.bill_code != null">
|
||||
and move.bill_code like CONCAT('%', #{query.bill_code}, '%')
|
||||
</if>
|
||||
<if test="query.bill_type != null">
|
||||
and move.bill_type = #{query.bill_type}
|
||||
</if>
|
||||
<if test="query.stor_id != null">
|
||||
and move.stor_id = #{query.stor_id}
|
||||
</if>
|
||||
<if test="query.create_mode != null">
|
||||
and move.create_mode = #{query.create_mode}
|
||||
</if>
|
||||
<if test="query.bill_status != null">
|
||||
and move.bill_status = #{query.bill_status}
|
||||
</if>
|
||||
<if test="query.begin_time != null">
|
||||
and move.input_time >= #{query.begin_time}
|
||||
</if>
|
||||
<if test="query.end_time != null">
|
||||
and move.input_time >= #{query.end_time}
|
||||
</if>
|
||||
ORDER BY move.bill_code desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.nl.wms.st.instor.movestor.service.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author: zds
|
||||
* @date: 2024-09-27
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class MoveStorQuery implements Serializable {
|
||||
//移库单号
|
||||
private String bill_code;
|
||||
//所属仓库
|
||||
private String stor_id;
|
||||
//物料名称、物料编码
|
||||
private String material_code;
|
||||
//生成方式
|
||||
private String create_mode;
|
||||
//单据状态
|
||||
private String bill_status;
|
||||
//业务类型
|
||||
private String bill_type;
|
||||
//创建时间
|
||||
private String begin_time;
|
||||
//创建时间
|
||||
private String end_time;
|
||||
//仓库权限
|
||||
private String user_id;
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.st.instor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.nl.wms.st.instor.movestor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
@@ -72,66 +72,11 @@
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
move.moveinv_id AS id,
|
||||
move.*
|
||||
FROM
|
||||
ST_IVT_MoveInv move
|
||||
WHERE
|
||||
1 = 1
|
||||
AND move.is_delete = '0'
|
||||
AND move.moveinv_id IN (
|
||||
SELECT DISTINCT
|
||||
(movedtl.moveinv_id)
|
||||
FROM
|
||||
st_ivt_moveinvdtl movedtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = movedtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.material_code <> ""
|
||||
(mb.material_code LIKE 输入.material_code OR mb.material_name LIKE 输入.material_code)
|
||||
ENDOPTION
|
||||
)
|
||||
AND move.stor_id in 输入.in_stor_id
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
move.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.buss_type <> ""
|
||||
move.buss_type like 输入.buss_type
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_type <> ""
|
||||
move.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
move.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.deptIds <> ""
|
||||
move.sysdeptid in 输入.deptIds
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
move.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_status <> ""
|
||||
move.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
move.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
move.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
MoveInvDtl.*,
|
||||
true as edit,
|
||||
mb.material_code,
|
||||
mb.material_name
|
||||
FROM
|
||||
@@ -244,6 +189,58 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "33"
|
||||
QUERY
|
||||
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_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'
|
||||
AND IFNULL(struct.storagevehicle_code,'') <> ''
|
||||
OPTION 输入.material_id <> ""
|
||||
ivt2.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
OPTION 输入.remark <> ""
|
||||
(mb.material_code like 输入.remark or mb.material_name like 输入.remark)
|
||||
ENDOPTION
|
||||
OPTION 输入.ids <> ""
|
||||
struct.storagevehicle_code in (输入.ids)
|
||||
ENDOPTION
|
||||
OPTION 输入.struct_code <> ""
|
||||
struct.struct_code like 输入.struct_code
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
ivt2.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.sect_id <> ""
|
||||
struct.sect_id = 输入.sect_id
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "35"
|
||||
QUERY
|
||||
SELECT
|
||||
@@ -277,64 +274,9 @@
|
||||
WHERE
|
||||
1 = 1
|
||||
AND struct.lock_type = '1'
|
||||
|
||||
OPTION 输入.package_box_sn <> ""
|
||||
sub.package_box_sn = 输入.package_box_sn
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "33"
|
||||
QUERY
|
||||
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'
|
||||
AND IFNULL(struct.storagevehicle_code,'') <> ''
|
||||
OPTION 输入.material_id <> ""
|
||||
ivt2.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
OPTION 输入.remark <> ""
|
||||
(mb.material_code like 输入.remark or mb.material_name like 输入.remark)
|
||||
ENDOPTION
|
||||
OPTION 输入.ids <> ""
|
||||
struct.storagevehicle_code in (输入.ids)
|
||||
ENDOPTION
|
||||
OPTION 输入.struct_code <> ""
|
||||
struct.struct_code like 输入.struct_code
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
ivt2.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.sect_id <> ""
|
||||
struct.sect_id = 输入.sect_id
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -35,8 +35,8 @@ import org.nl.wms.sch.tasks.OutTask;
|
||||
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.nl.wms.st.instor.movestor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.movestor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
|
||||
import org.nl.wms.st.outbill.util.ThreadManage;
|
||||
import org.nl.wms.st.returns.service.InAndOutReturnService;
|
||||
|
||||
Reference in New Issue
Block a user