diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/rest/RegionIoController.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/rest/RegionIoController.java index 305090d..3d38fc0 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/rest/RegionIoController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/rest/RegionIoController.java @@ -34,14 +34,6 @@ public class RegionIoController { return new ResponseEntity<>(regionioService.queryAll(whereJson,page),HttpStatus.OK); } - @GetMapping("/warehousing") - @Log("查询养生区和成品库存") - @ApiOperation("查询养生区和成品库存") - //@SaCheckPermission("@el.check('regionio:list')") - public ResponseEntity queryWarehousing(@RequestParam Map whereJson, Pageable page){ - return new ResponseEntity<>(regionioService.queryWarehousing(whereJson,page),HttpStatus.OK); - } - @PostMapping @Log("新增1") @ApiOperation("新增1") diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/RegionIoService.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/RegionIoService.java index 43cb922..beeb8c0 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/RegionIoService.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/RegionIoService.java @@ -64,11 +64,4 @@ public interface RegionIoService { */ void deleteAll(Long[] ids); - /** - * 查询养生区和成品库存 - * @param whereJson - * @param page - * @return - */ - JSONObject queryWarehousing(Map whereJson, Pageable page); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/impl/RegionIoServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/impl/RegionIoServiceImpl.java index 0b89c3d..e9ec0e4 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/impl/RegionIoServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/service/impl/RegionIoServiceImpl.java @@ -34,7 +34,6 @@ import cn.hutool.core.util.ObjectUtil; @RequiredArgsConstructor @Slf4j public class RegionIoServiceImpl implements RegionIoService { - private final RegionService regionService; @Override public Map queryAll(Map whereJson, Pageable page){ @@ -138,48 +137,5 @@ public class RegionIoServiceImpl implements RegionIoService { } } - /** - * 查询养生区和成品库存 - * - * @param whereJson - * @param page - * @return - */ - @Override - public JSONObject queryWarehousing(Map whereJson, Pageable page) { - JSONObject map = new JSONObject(); - map.put("flag", "2"); - map.put("region_code", "(" + whereJson.get("region_code") + ")"); - if (!ObjectUtil.isNull(whereJson.get("point_code"))) { - map.put("point_code", "%" + whereJson.get("point_code") + "%"); - } - map.put("layer_num", whereJson.get("layer_num")); - map.put("row_num", whereJson.get("row_num")); - map.put("col_num", whereJson.get("col_num")); - map.put("is_used", whereJson.get("is_used")); - map.put("lock_type", whereJson.get("lock_type")); - map.put("point_status", whereJson.get("point_status")); - map.put("vehicle_type", whereJson.get("vehicle_type")); - map.put("begin_time", whereJson.get("begin_time")); - map.put("end_time", whereJson.get("end_time")); - JSONObject json = WQL.getWO("ST_IVT_REGIONIO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc"); - JSONArray content = json.getJSONArray("content"); - JSONArray res = new JSONArray(); - for (int i = 0; i < content.size(); i++) { - JSONObject cppEntry = content.getJSONObject(i); - String point_status_explain = regionService.findById(cppEntry.getLong("region_id")).getPoint_status_explain(); - String[] split = point_status_explain.split(","); - JSONObject statusMap = new JSONObject(); - for (int j = 0; j < split.length; j++) { - String[] status = split[j].split("-"); - statusMap.put(status[0], status[1]); - } - cppEntry.put("point_status_name", statusMap.getString(cppEntry.getString("point_status"))); - res.add(cppEntry); - } - json.put("content", res); - return json; - } - } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/wql/ST_IVT_REGIONIO.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/wql/ST_IVT_REGIONIO.wql index afedcd2..2b5a29a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/wql/ST_IVT_REGIONIO.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/bill/wql/ST_IVT_REGIONIO.wql @@ -73,52 +73,3 @@ ENDPAGEQUERY ENDIF - IF 输入.flag = "2" - PAGEQUERY - SELECT - cppoint.*, - str.stockrecord_id, - str.pcsn, - str.material_id, - str.ivt_qty, - str.qty_unit_id, - str.instorage_time, - str.standing_time - FROM - st_ivt_structivt str - LEFT JOIN sch_base_point cppoint ON str.point_id = cppoint.point_id - WHERE - cppoint.region_code IN 输入.region_code - OPTION 输入.point_code <> "" - point_code LIKE 输入.point_code - ENDOPTION - OPTION 输入.point_status <> "" - point_status = 输入.point_status - ENDOPTION - OPTION 输入.vehicle_type <> "" - vehicle_type = 输入.vehicle_type - ENDOPTION - OPTION 输入.layer_num <> "" - layer_num = 输入.layer_num - ENDOPTION - OPTION 输入.row_num <> "" - row_num = 输入.row_num - ENDOPTION - OPTION 输入.col_num <> "" - col_num = 输入.col_num - ENDOPTION - OPTION 输入.lock_type <> "" - YsaPoint.lock_type = 输入.lock_type - ENDOPTION - OPTION 输入.is_used <> "" - is_used = 输入.is_used - ENDOPTION - OPTION 输入.begin_time <> "" - instorage_time >= 输入.begin_time - ENDOPTION - OPTION 输入.end_time <> "" - instorage_time <= 输入.end_time - ENDOPTION - ENDSELECT - ENDPAGEQUERY - ENDIF \ No newline at end of file diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/rest/StructivtController.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/rest/StructivtController.java new file mode 100644 index 0000000..07ee594 --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/rest/StructivtController.java @@ -0,0 +1,66 @@ +package org.nl.wms.st.structivt.rest; + +import org.nl.wms.st.structivt.service.StructivtService; +import org.nl.wms.st.structivt.service.dto.StructivtDto; +import org.springframework.data.domain.Pageable; +import lombok.RequiredArgsConstructor; +import org.nl.modules.logging.annotation.Log; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; +import java.util.Map; +import lombok.extern.slf4j.Slf4j; + +/** + * @author: lyd + * @description: + * @Date: 2022/10/24 + */ +@RestController +@RequiredArgsConstructor +@Api(tags = "仓位库存管理") +@RequestMapping("/api/structivt") +@Slf4j +public class StructivtController { + + private final StructivtService structivtService; + + @GetMapping + @Log("查询养生区和成品库存") + @ApiOperation("查询养生区和成品库存") + //@SaCheckPermission("@el.check('structivt:list')") + public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ + return new ResponseEntity<>(structivtService.queryAll(whereJson,page),HttpStatus.OK); + } + + @PostMapping + @Log("新增1") + @ApiOperation("新增1") + //@SaCheckPermission("@el.check('structivt:add')") + public ResponseEntity create(@Validated @RequestBody StructivtDto dto){ + structivtService.create(dto); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @PutMapping + @Log("修改1") + @ApiOperation("修改1") + //@SaCheckPermission("@el.check('structivt:edit')") + public ResponseEntity update(@Validated @RequestBody StructivtDto dto){ + structivtService.update(dto); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除1") + @ApiOperation("删除1") + //@SaCheckPermission("@el.check('structivt:del')") + @DeleteMapping + public ResponseEntity delete(@RequestBody Long[] ids) { + structivtService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} + diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/StructivtService.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/StructivtService.java new file mode 100644 index 0000000..9884652 --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/StructivtService.java @@ -0,0 +1,65 @@ +package org.nl.wms.st.structivt.service; + +import org.nl.wms.st.structivt.service.dto.StructivtDto; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** + * @author: lyd + * @description: + * @Date: 2022/10/24 + */ +public interface StructivtService { + + /** + * 查询数据分页 + * @param whereJson 条件 + * @param page 分页参数 + * @return Map + */ + Map queryAll(Map whereJson, Pageable page); + + /** + * 查询所有数据不分页 + * @param whereJson 条件参数 + * @return List + */ + List queryAll(Map whereJson); + + /** + * 根据ID查询 + * @param stockrecord_id ID + * @return Structivt + */ + StructivtDto findById(Long stockrecord_id); + + /** + * 根据编码查询 + * @param code code + * @return Structivt + */ + StructivtDto findByCode(String code); + + + /** + * 创建 + * @param dto / + */ + void create(StructivtDto dto); + + /** + * 编辑 + * @param dto / + */ + void update(StructivtDto dto); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(Long[] ids); +} + diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/dto/StructivtDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/dto/StructivtDto.java new file mode 100644 index 0000000..52e903d --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/dto/StructivtDto.java @@ -0,0 +1,91 @@ +package org.nl.wms.st.structivt.service.dto; + +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author: lyd + * @description: + * @Date: 2022/10/24 + */ +@Data +public class StructivtDto implements Serializable { + + /** 库存记录标识 */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long stockrecord_id; + + /** 仓位标识 */ + private Long point_id; + + /** 仓位编码 */ + private String point_code; + + /** 仓位名称 */ + private String point_name; + + /** 所属区域 */ + private Long region_id; + + /** 区域编码 */ + private String region_code; + + /** 区域名称 */ + private String region_name; + + /** 点位状态 */ + private String point_status; + + /** 锁定类型 */ + private String lock_type; + + /** 载具类型 */ + private String vehicle_type; + + /** 载具编码 */ + private String vehicle_code; + + /** 载具数量 */ + private BigDecimal vehicle_qty; + + /** 批次 */ + private String pcsn; + + /** 物料标识 */ + private Long material_id; + + /** 库存数 */ + private BigDecimal ivt_qty; + + /** 计量单位标识 */ + private Long qty_unit_id; + + /** 入库时间 */ + private String instorage_time; + + /** 静置时间(分钟) */ + private BigDecimal standing_time; + + /** 创建人 */ + private Long create_id; + + /** 创建人 */ + private String create_name; + + /** 创建时间 */ + private String create_time; + + /** 修改人 */ + private Long update_optid; + + /** 修改人姓名 */ + private String update_optname; + + /** 修改时间 */ + private String update_time; +} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/impl/StructivtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/impl/StructivtServiceImpl.java new file mode 100644 index 0000000..c5456a2 --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/service/impl/StructivtServiceImpl.java @@ -0,0 +1,230 @@ +package org.nl.wms.st.structivt.service.impl; + +import com.alibaba.fastjson.JSON; +import lombok.RequiredArgsConstructor; +import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.wql.WQL; +import org.nl.wms.sch.service.PointService; +import org.nl.wms.sch.service.RegionService; +import org.nl.wms.sch.service.dto.PointDto; +import org.nl.wms.st.structivt.service.StructivtService; +import org.nl.wms.st.structivt.service.dto.StructivtDto; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import org.springframework.data.domain.Pageable; +import java.util.List; +import java.util.Map; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.nl.modules.common.utils.SecurityUtils; +import org.nl.modules.wql.core.bean.ResultBean; +import org.nl.modules.wql.core.bean.WQLObject; +import org.nl.modules.wql.util.WqlUtil; +import lombok.extern.slf4j.Slf4j; +import cn.hutool.core.util.ObjectUtil; + +/** + * @author: lyd + * @description: + * @Date: 2022/10/24 + */ +@Service +@RequiredArgsConstructor +@Slf4j +public class StructivtServiceImpl implements StructivtService { + + private final RegionService regionService; + private final PointService pointService; + + @Override + public Map queryAll(Map whereJson, Pageable page){ + JSONObject map = new JSONObject(); + map.put("flag", "1"); + map.put("region_code", "(" + whereJson.get("region_code") + ")"); + if (!ObjectUtil.isNull(whereJson.get("point_code"))) { + map.put("point_code", "%" + whereJson.get("point_code") + "%"); + } + map.put("layer_num", whereJson.get("layer_num")); + map.put("row_num", whereJson.get("row_num")); + map.put("col_num", whereJson.get("col_num")); + map.put("is_used", whereJson.get("is_used")); + map.put("lock_type", whereJson.get("lock_type")); + map.put("point_status", whereJson.get("point_status")); + map.put("vehicle_type", whereJson.get("vehicle_type")); + map.put("begin_time", whereJson.get("begin_time")); + map.put("end_time", whereJson.get("end_time")); + JSONObject json = WQL.getWO("ST_IVT_STRUCTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc"); + JSONArray content = json.getJSONArray("content"); + JSONArray res = new JSONArray(); + for (int i = 0; i < content.size(); i++) { + JSONObject cppEntry = content.getJSONObject(i); + String point_status_explain = regionService.findById(cppEntry.getLong("region_id")).getPoint_status_explain(); + String[] split = point_status_explain.split(","); + JSONObject statusMap = new JSONObject(); + for (int j = 0; j < split.length; j++) { + String[] status = split[j].split("-"); + statusMap.put(status[0], status[1]); + } + cppEntry.put("point_status_name", statusMap.getString(cppEntry.getString("point_status"))); + res.add(cppEntry); + } + json.put("content", res); + return json; + } + + @Override + public List queryAll(Map whereJson){ + WQLObject wo = WQLObject.getWQLObject("st_ivt_structivt"); + JSONArray arr = wo.query().getResultJSONArray(0); + if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(StructivtDto.class); + return null; + } + + @Override + public StructivtDto findById(Long stockrecord_id) { + WQLObject wo = WQLObject.getWQLObject("st_ivt_structivt"); + JSONObject json = wo.query("stockrecord_id = '" + stockrecord_id + "'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(json)){ + return json.toJavaObject( StructivtDto.class); + } + return null; + } + + @Override + public StructivtDto findByCode(String code) { + WQLObject wo = WQLObject.getWQLObject("st_ivt_structivt"); + JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(json)){ + return json.toJavaObject( StructivtDto.class); + } + return null; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(StructivtDto dto) { + Long currentUserId = SecurityUtils.getCurrentUserId(); + String nickName = SecurityUtils.getCurrentNickName(); + String now = DateUtil.now(); + + dto.setStockrecord_id(IdUtil.getSnowflake(1, 1).nextId()); + dto.setCreate_id(currentUserId); + dto.setCreate_name(nickName); + dto.setUpdate_optid(currentUserId); + dto.setUpdate_optname(nickName); + dto.setUpdate_time(now); + dto.setCreate_time(now); + + WQLObject wo = WQLObject.getWQLObject("st_ivt_structivt"); + JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); + wo.insert(json); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(StructivtDto dto) { + // 找主表获取之前的数据 + StructivtDto structivtDto = this.findById(dto.getStockrecord_id()); + if (structivtDto == null) throw new BadRequestException("被删除或无权限,操作失败!"); + + Long currentUserId = SecurityUtils.getCurrentUserId(); + String nickName = SecurityUtils.getCurrentNickName(); + String now = DateUtil.now(); + + JSONObject intoBeforeObject = new JSONObject(); + // 存储主表之前数据 + intoBeforeObject.put("stockrecord_id", IdUtil.getSnowflake(1, 1).nextId()); + intoBeforeObject.put("point_id", structivtDto.getPoint_id()); + intoBeforeObject.put("point_code", structivtDto.getPoint_code()); + intoBeforeObject.put("point_name", structivtDto.getPoint_name()); + intoBeforeObject.put("region_id", structivtDto.getRegion_id()); + intoBeforeObject.put("region_code", structivtDto.getRegion_code()); + intoBeforeObject.put("region_name", structivtDto.getRegion_name()); + intoBeforeObject.put("pcsn", structivtDto.getPcsn()); + intoBeforeObject.put("material_id", structivtDto.getMaterial_id()); + intoBeforeObject.put("ivt_qty", structivtDto.getIvt_qty()); + intoBeforeObject.put("qty_unit_id", structivtDto.getQty_unit_id()); + intoBeforeObject.put("standing_time", structivtDto.getStanding_time()); + intoBeforeObject.put("instorage_time", structivtDto.getInstorage_time()); + PointDto pointDto = pointService.findById(structivtDto.getPoint_id()); + if (ObjectUtil.isNotEmpty(pointDto)) { + intoBeforeObject.put("point_status", pointDto.getPoint_status()); + intoBeforeObject.put("lock_type", pointDto.getLock_type()); + intoBeforeObject.put("vehicle_type", pointDto.getVehicle_type()); + intoBeforeObject.put("vehicle_code", pointDto.getVehicle_code()); + intoBeforeObject.put("vehicle_qty", pointDto.getVehicle_qty()); + } + intoBeforeObject.put("create_id", currentUserId); + intoBeforeObject.put("create_name", nickName); + intoBeforeObject.put("create_time", now); + // 插入修改前的数据表 + WQLObject beforeWo = WQLObject.getWQLObject("ST_IVT_StructBeforeIvt"); + beforeWo.insert(intoBeforeObject); + // 修改点位的载具类型和点位状态和锁定 + PointDto pointDto2 = pointService.findById(dto.getPoint_id()); + if (ObjectUtil.isNotEmpty(pointDto2)) { + pointDto2.setVehicle_type(dto.getVehicle_type()); + pointDto2.setPoint_status(dto.getPoint_status()); + pointDto2.setLock_type(dto.getLock_type()); + // 更新 + WQLObject pointWo = WQLObject.getWQLObject("SCH_BASE_Point"); + JSONObject pointJson = JSONObject.parseObject(JSON.toJSONString(pointDto2)); + pointWo.update(pointJson); + } + // 将修改之后的数据存入修改之后的表中 + JSONObject intoAfterObject = new JSONObject(); + // 存储修改数据到修改后的表 + intoAfterObject.put("stockrecord_id", IdUtil.getSnowflake(1, 1).nextId()); + intoAfterObject.put("point_id", dto.getPoint_id()); + intoAfterObject.put("point_code", dto.getPoint_code()); + intoAfterObject.put("point_name", dto.getPoint_name()); + intoAfterObject.put("region_id", dto.getRegion_id()); + intoAfterObject.put("region_code", dto.getRegion_code()); + intoAfterObject.put("region_name", dto.getRegion_name()); + intoAfterObject.put("pcsn", dto.getPcsn()); + intoAfterObject.put("material_id", dto.getMaterial_id()); + intoAfterObject.put("ivt_qty", dto.getIvt_qty()); + intoAfterObject.put("qty_unit_id", dto.getQty_unit_id()); + intoAfterObject.put("standing_time", dto.getStanding_time()); + intoAfterObject.put("instorage_time", dto.getInstorage_time()); + + if (ObjectUtil.isNotEmpty(pointDto2)) { + intoAfterObject.put("point_status", pointDto2.getPoint_status()); + intoAfterObject.put("lock_type", pointDto2.getLock_type()); + } + intoAfterObject.put("create_id", currentUserId); + intoAfterObject.put("create_name", nickName); + intoAfterObject.put("create_time", now); + WQLObject afterWo = WQLObject.getWQLObject("ST_IVT_StructAfterIvt"); + afterWo.insert(intoAfterObject); + + // 更新主表 + WQLObject wo = WQLObject.getWQLObject("st_ivt_structivt"); + JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); + wo.update(json); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteAll(Long[] ids) { + Long currentUserId = SecurityUtils.getCurrentUserId(); + String nickName = SecurityUtils.getCurrentNickName(); + String now = DateUtil.now(); + + WQLObject wo = WQLObject.getWQLObject("st_ivt_structivt"); + for (Long stockrecord_id: ids) { + JSONObject param = new JSONObject(); + param.put("stockrecord_id", String.valueOf(stockrecord_id)); + param.put("is_delete", "1"); + param.put("update_optid", currentUserId); + param.put("update_optname", nickName); + param.put("update_time", now); + wo.update(param); + } + } + +} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/wql/ST_IVT_STRUCTIVT.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/wql/ST_IVT_STRUCTIVT.wql new file mode 100644 index 0000000..8ac05a6 --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/structivt/wql/ST_IVT_STRUCTIVT.wql @@ -0,0 +1,95 @@ +[交易说明] + 交易名: 仓位库存 + 所属模块: + 功能简述: + 版权所有: + 表引用: + 版本经历: + +[数据库] + --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 + +[IO定义] + ################################################# + ## 表字段对应输入参数 + ################################################# + 输入.flag TYPEAS s_string + 输入.io_region TYPEAS f_string + 输入.region_code TYPEAS f_string + 输入.begin_time TYPEAS s_string + 输入.end_time TYPEAS s_string + 输入.bill_code TYPEAS s_string + 输入.bill_status TYPEAS s_string + 输入.io_type TYPEAS s_string + + +[临时表] + --这边列出来的临时表就会在运行期动态创建 + +[临时变量] + --所有中间过程变量均可在此处定义 + +[业务过程] + + ########################################## + # 1、输入输出检查 # + ########################################## + + + ########################################## + # 2、主过程前处理 # + ########################################## + + + ########################################## + # 3、业务主过程 # + ########################################## + IF 输入.flag = "1" + PAGEQUERY + SELECT + cppoint.*, + str.stockrecord_id, + str.pcsn, + str.material_id, + str.ivt_qty, + str.qty_unit_id, + str.instorage_time, + str.standing_time + FROM + st_ivt_structivt str + LEFT JOIN sch_base_point cppoint ON str.point_id = cppoint.point_id + WHERE + cppoint.region_code IN 输入.region_code + OPTION 输入.point_code <> "" + point_code LIKE 输入.point_code + ENDOPTION + OPTION 输入.point_status <> "" + point_status = 输入.point_status + ENDOPTION + OPTION 输入.vehicle_type <> "" + vehicle_type = 输入.vehicle_type + ENDOPTION + OPTION 输入.layer_num <> "" + layer_num = 输入.layer_num + ENDOPTION + OPTION 输入.row_num <> "" + row_num = 输入.row_num + ENDOPTION + OPTION 输入.col_num <> "" + col_num = 输入.col_num + ENDOPTION + OPTION 输入.lock_type <> "" + YsaPoint.lock_type = 输入.lock_type + ENDOPTION + OPTION 输入.is_used <> "" + is_used = 输入.is_used + ENDOPTION + OPTION 输入.begin_time <> "" + instorage_time >= 输入.begin_time + ENDOPTION + OPTION 输入.end_time <> "" + instorage_time <= 输入.end_time + ENDOPTION + ENDSELECT + ENDPAGEQUERY + ENDIF \ No newline at end of file diff --git a/lms/nladmin-ui/src/views/wms/st/cppoint/cppInRegion.vue b/lms/nladmin-ui/src/views/wms/st/cppoint/cppInRegion.vue index 9970300..b145a0d 100644 --- a/lms/nladmin-ui/src/views/wms/st/cppoint/cppInRegion.vue +++ b/lms/nladmin-ui/src/views/wms/st/cppoint/cppInRegion.vue @@ -134,7 +134,7 @@