This commit is contained in:
2022-10-09 18:16:10 +08:00
parent 3893c034a2
commit a36889dcd1
29 changed files with 2614 additions and 185 deletions

View File

@@ -43,6 +43,8 @@ public class WqlUtil {
str = e.toString();
} else if ("java.lang.Double".equals(classStr)) {
str = String.valueOf(o);
} else if ("java.math.BigInteger".equals(classStr)) {
str = String.valueOf(o);
} else if ("oracle.sql.CLOB".equals(classStr)) {
/* CLOB e2 = (CLOB) o;

View File

@@ -3,6 +3,7 @@ package org.nl.wms.ext.mes.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
@@ -81,7 +82,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
json.put("product_area", jsonPoint.getString("product_area"));
json.put("point_code", jsonPoint.getString("point_code"));
json.put("realstart_time", DateUtil.now());
json.put("status", "01");
json.put("status", "1");
json.put("is_delete", "0");
json.put("agvno", "0");
json.put("productin_qty", 0);
@@ -176,12 +177,111 @@ public class MesToLmsServiceImpl implements MesToLmsService {
@Override
public JSONObject cutPlanTransfer(JSONObject param) {
log.info("cutPlanTransfer接口输入参数为-------------------"+param.toString());
String orderType = param.getString("OrderType"); // 分切订单类型
String ContainerName = param.getString("ContainerName"); // 子卷号
String ProductName = param.getString("ProductName"); // 产品编码
String Description = param.getString("Description"); // 产品名称
String Warehouse = param.getString("Warehouse"); // 来源卷位置
String ResourceName = param.getString("ResourceName"); // 分切机台编码
String SplitGroup = param.getString("SplitGroup"); // 分切组
String ManufactureSort = param.getString("ManufactureSort"); // 生产顺序
String MfgOrderName = param.getString("MfgOrderName"); // 生产订单
String ManufactureDate = param.getString("ManufactureDate"); // 生产日期
String PaperTubeOrFRP = param.getString("PaperTubeOrFRP"); // 管件类型
String SplitBreadth = param.getString("SplitBreadth"); // 子卷幅宽
String SplitHeight = param.getString("SplitHeight"); // 子卷理论长度
String SplitWeight = param.getString("SplitWeight"); // 子卷理论重量
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
JSONObject result = new JSONObject();
result.put("RTYPE", "S");
result.put("RTMSG", "操作成功!");
result.put("RTOAL", 1);
result.put("RTDAT", null);
System.out.println(result);
try {
// 基础校验
if (ObjectUtil.isEmpty(orderType)) throw new BadRequestException("分切订单类型不能为空");
if (ObjectUtil.isEmpty(ContainerName)) throw new BadRequestException("子卷号不能为空");
if (ObjectUtil.isEmpty(ProductName)) throw new BadRequestException("产品编码不能为空");
if (ObjectUtil.isEmpty(Description)) throw new BadRequestException("产品名称不能为空");
if (ObjectUtil.isEmpty(Warehouse)) throw new BadRequestException("来源卷位置不能为空");
if (ObjectUtil.isEmpty(ResourceName)) throw new BadRequestException("分切机台编码不能为空");
if (ObjectUtil.isEmpty(SplitGroup)) throw new BadRequestException("分切组不能为空");
if (ObjectUtil.isEmpty(ManufactureSort)) throw new BadRequestException("生产顺序不能为空");
if (ObjectUtil.isEmpty(MfgOrderName)) throw new BadRequestException("生产订单不能为空");
if (ObjectUtil.isEmpty(ManufactureDate)) throw new BadRequestException("生产日期不能为空");
if (ObjectUtil.isEmpty(PaperTubeOrFRP)) throw new BadRequestException("管件类型不能为空");
if (ObjectUtil.isEmpty(SplitBreadth)) throw new BadRequestException("子卷幅宽不能为空");
if (ObjectUtil.isEmpty(SplitHeight)) throw new BadRequestException("子卷理论长度不能为空");
if (ObjectUtil.isEmpty(SplitWeight)) throw new BadRequestException("子卷理论重量不能为空");
/* orderType
* 1.当订单类型为1常规时 ParentContainerName 来源母卷号不能为空
* 2.当订单类型为2改制时 RestructContainerName 改制来源子卷号、PackageBoxSN 子卷立库木箱号 不能为空
*/
if (StrUtil.equals(orderType, "1")) {
if (ObjectUtil.isEmpty(param.getString("ParentContainerName"))) throw new BadRequestException("来源母卷号不能为空");
} else {
if (ObjectUtil.isEmpty(param.getString("RestructContainerName"))) throw new BadRequestException("改制来源子卷号不能为空");
if (ObjectUtil.isEmpty(param.getString("PackageBoxSN"))) throw new BadRequestException("子卷立库木箱号不能为空");
}
/* PaperTubeOrFRP
* 1.当管件类型为1纸筒时 PaperTubeMaterial 纸筒物料编码、PaperTubeDescription 纸筒物料描述、PaperTubeModel 纸筒规格 不能为空
* 2.当管件类型为2FRP管时 FRPMaterial FRP管物料编码、FRPDescription FRP管物料描述、FRPModel FRP管规格 不能为空
*/
if (StrUtil.equals(PaperTubeOrFRP, "1")) {
if (ObjectUtil.isEmpty(param.getString("PaperTubeMaterial"))) throw new BadRequestException("纸筒物料编码不能为空");
if (ObjectUtil.isEmpty(param.getString("PaperTubeDescription"))) throw new BadRequestException("纸筒物料描述不能为空");
if (ObjectUtil.isEmpty(param.getString("PaperTubeModel"))) throw new BadRequestException("纸筒规格不能为空");
} else {
if (ObjectUtil.isEmpty(param.getString("FRPMaterial"))) throw new BadRequestException("FRP管物料编码不能为空");
if (ObjectUtil.isEmpty(param.getString("FRPDescription"))) throw new BadRequestException("FRP管物料描述不能为空");
if (ObjectUtil.isEmpty(param.getString("FRPModel"))) throw new BadRequestException("FRP管规格不能为空");
}
JSONObject json = new JSONObject();
json.put("workorder_id", IdUtil.getSnowflake(1,1).nextId());
json.put("order_type", orderType);
json.put("container_name", ContainerName);
json.put("product_name", ProductName);
json.put("description", Description);
json.put("parent_container_name", param.getString("ParentContainerName"));
json.put("restruct_container_name", param.getString("RestructContainerName"));
json.put("package_box_sn", param.getString("PackageBoxSN"));
json.put("ware_house", Warehouse);
json.put("resource_name", ResourceName);
json.put("split_group", SplitGroup);
json.put("manufacture_sort", ManufactureSort);
json.put("mfg_order_name", MfgOrderName);
json.put("manufacture_date", ManufactureDate);
json.put("paper_tube_or_FRP", PaperTubeOrFRP);
json.put("paper_tube_material", param.getString("PaperTubeMaterial"));
json.put("paper_tube_description", param.getString("PaperTubeDescription"));
json.put("paper_tube_model", param.getString("PaperTubeModel"));
json.put("FRP_material", param.getString("FRPMaterial"));
json.put("FRP_description", param.getString("FRPDescription"));
json.put("FRP_model", param.getString("FRPModel"));
json.put("split_breadth", SplitBreadth);
json.put("split_height", SplitHeight);
json.put("split_weight", SplitWeight);
json.put("start_time",DateUtil.now());
json.put("status","1");
json.put("is_parent_ok","0");
json.put("is_child_tz_ok","0");
json.put("is_child_ps_ok","0");
json.put("is_delete","0");
tab.insert(json);
result.put("RTYPE", "S");
result.put("RTMSG", "操作成功!");
result.put("RTOAL", 1);
result.put("RTDAT", null);
System.out.println(result);
} catch (Exception e) {
result.put("RTYPE", "S");
result.put("RTMSG", "操作失败!"+e.getMessage());
result.put("RTOAL", 0);
result.put("RTDAT", null);
System.out.println(result);
}
return result;
}

View File

@@ -0,0 +1,67 @@
package org.nl.wms.pdm.ivt.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.logging.annotation.Log;
import org.nl.wms.pdm.ivt.service.HotPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @author lyd
* @date 2022-10-09
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "烘烤区点位库存管理")
@RequestMapping("/api/hotpointivt")
@Slf4j
public class HotPointIvtController {
private final HotPointIvtService hotpointivtService;
@GetMapping
@Log("查询烘烤区点位库存")
@ApiOperation("查询烘烤区点位库存")
//@SaCheckPermission("@el.check('hotpointivt:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
return new ResponseEntity<>(hotpointivtService.queryAll(whereJson,page),HttpStatus.OK);
}
@PostMapping
@Log("新增烘烤区点位库存")
@ApiOperation("新增烘烤区点位库存")
//@SaCheckPermission("@el.check('hotpointivt:add')")
public ResponseEntity<Object> create(@Validated @RequestBody HotPointIvtDto dto){
hotpointivtService.create(dto);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改烘烤区点位库存")
@ApiOperation("修改烘烤区点位库存")
//@SaCheckPermission("@el.check('hotpointivt:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody HotPointIvtDto dto){
hotpointivtService.update(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除烘烤区点位库存")
@ApiOperation("删除烘烤区点位库存")
//@SaCheckPermission("@el.check('hotpointivt:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
hotpointivtService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -0,0 +1,64 @@
package org.nl.wms.pdm.ivt.service;
import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Map;
/**
* @description 服务接口
* @author lyd
* @date 2022-10-09
**/
public interface HotPointIvtService {
/**
* 查询数据分页
* @param whereJson 条件
* @param page 分页参数
* @return Map<String,Object>
*/
Map<String,Object> queryAll(Map whereJson, Pageable page);
/**
* 查询所有数据不分页
* @param whereJson 条件参数
* @return List<HotpointivtDto>
*/
List<HotPointIvtDto> queryAll(Map whereJson);
/**
* 根据ID查询
* @param ivt_id ID
* @return Hotpointivt
*/
HotPointIvtDto findById(Long ivt_id);
/**
* 根据编码查询
* @param code code
* @return Hotpointivt
*/
HotPointIvtDto findByCode(String code);
/**
* 创建
* @param dto /
*/
void create(HotPointIvtDto dto);
/**
* 编辑
* @param dto /
*/
void update(HotPointIvtDto dto);
/**
* 多选删除
* @param ids /
*/
void deleteAll(Long[] ids);
}

View File

@@ -92,6 +92,9 @@ public class CoolPointIvtDto implements Serializable {
/** 满轴位状态 */
private String full_point_status;
/** 库存状态 **/
private String cool_ivt_status;
/** 空轴位状态 */
private String empty_point_status;
}

View File

@@ -0,0 +1,88 @@
package org.nl.wms.pdm.ivt.service.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @description /
* @author lyd
* @date 2022-10-09
**/
@Data
public class HotPointIvtDto implements Serializable {
/** 库存记录标识 */
/** 防止精度丢失 */
@JsonSerialize(using= ToStringSerializer.class)
private Long ivt_id;
/** 点位编码 */
private String point_code;
/** 点位状态 */
private String point_status;
/** 母卷号 */
private String container_name;
/** 母卷工单标识 */
private String workorder_id;
/** 母卷轴编码 */
private String full_vehicle_code;
/** 批次 */
private String pcsn;
/** 库存数 */
private BigDecimal ivt_qty;
/** 计量单位标识 */
private Long qty_unit_id;
/** 入库时间 */
private String instorage_time;
/** 生产区域 */
private String product_area;
/** 温度 */
private BigDecimal temperature;
/** 组别 */
private String group_name;
/** 位置 */
private String point_location;
/** 顺序号 */
private BigDecimal sort_seq;
/** 是否启用 */
private String is_used;
/** 备注 */
private String remark;
/** 创建人 */
private Long create_id;
/** 创建人姓名 */
private String create_name;
/** 创建时间 */
private String create_time;
/** 修改人 */
private Long update_optid;
/** 修改人姓名 */
private String update_optname;
/** 修改时间 */
private String update_time;
}

View File

@@ -12,7 +12,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.wql.core.bean.ResultBean;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.pdm.ivt.service.CoolPointIvtService;
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,98 +35,109 @@ import java.util.Map;
@Slf4j
public class CoolPointIvtServiceImpl implements CoolPointIvtService {
@Override
public Map<String,Object> queryAll(Map whereJson, Pageable page){
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1", "update_time desc");
final JSONObject json = rb.pageResult();
return json;
}
@Override
public Map<String,Object> queryAll(Map whereJson, Pageable page){
HashMap map = new HashMap();
map.put("flag", "1");
if (whereJson.get("point_code")!=null)
map.put("point_code", "%" + whereJson.get("point_code") + "%");
if (whereJson.get("container_name")!=null)
map.put("container_name", "%" + whereJson.get("container_name") + "%");
map.put("full_point_status", whereJson.get("full_point_status"));
map.put("empty_point_status", whereJson.get("empty_point_status"));
map.put("cool_ivt_status", whereJson.get("cool_ivt_status"));
map.put("product_area", whereJson.get("product_area"));
map.put("is_used", whereJson.get("is_used"));
map.put("begin_time", whereJson.get("begin_time"));
map.put("end_time", whereJson.get("end_time"));
JSONObject json = WQL.getWO("ST_IVT_COOLPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
return json;
}
@Override
public List<CoolPointIvtDto> queryAll(Map whereJson){
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONArray arr = wo.query().getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(CoolPointIvtDto.class);
return null;
@Override
public List<CoolPointIvtDto> queryAll(Map whereJson){
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONArray arr = wo.query().getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(CoolPointIvtDto.class);
return null;
}
@Override
public CoolPointIvtDto findById(Long ivt_id) {
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONObject json = wo.query("ivt_id = '" + ivt_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject( CoolPointIvtDto.class);
}
return null;
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONObject json = wo.query("ivt_id = '" + ivt_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject( CoolPointIvtDto.class);
}
return null;
}
@Override
public CoolPointIvtDto findByCode(String code) {
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject( CoolPointIvtDto.class);
}
return null;
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject( CoolPointIvtDto.class);
}
return null;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void create(CoolPointIvtDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setIvt_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);
dto.setIvt_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_coolpointivt");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json);
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CoolPointIvtDto dto) {
CoolPointIvtDto entity = this.findById(dto.getIvt_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
CoolPointIvtDto entity = this.findById(dto.getIvt_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName);
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName);
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.update(json);
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
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();
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
for (Long ivt_id: ids) {
JSONObject param = new JSONObject();
param.put("ivt_id", String.valueOf(ivt_id));
param.put("is_delete", "1");
param.put("update_optid", currentUserId);
param.put("update_optname", nickName);
param.put("update_time", now);
wo.update(param);
}
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
for (Long ivt_id: ids) {
JSONObject param = new JSONObject();
param.put("ivt_id", String.valueOf(ivt_id));
param.put("is_delete", "1");
param.put("update_optid", currentUserId);
param.put("update_optname", nickName);
param.put("update_time", now);
wo.update(param);
}
}
}
}

View File

@@ -12,7 +12,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.wql.core.bean.ResultBean;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.pdm.ivt.service.CutPointIvtService;
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -36,9 +37,15 @@ public class CutPointIvtServiceImpl implements CutPointIvtService {
@Override
public Map<String,Object> queryAll(Map whereJson, Pageable page){
WQLObject wo = WQLObject.getWQLObject("st_ivt_cutpointivt");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1", "update_time desc");
final JSONObject json = rb.pageResult();
HashMap map = new HashMap();
map.put("flag", "1");
if (whereJson.get("point_code")!=null)
map.put("point_code", "%" + whereJson.get("point_code") + "%");
map.put("full_point_status", whereJson.get("full_point_status"));
map.put("empty_point_status", whereJson.get("empty_point_status"));
map.put("product_area", whereJson.get("product_area"));
map.put("is_used", whereJson.get("is_used"));
JSONObject json = WQL.getWO("ST_IVT_CUTPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
return json;
}

View File

@@ -0,0 +1,140 @@
package org.nl.wms.pdm.ivt.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.pdm.ivt.service.HotPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @description 服务实现
* @author lyd
* @date 2022-10-09
**/
@Service
@RequiredArgsConstructor
@Slf4j
public class HotPointIvtServiceImpl implements HotPointIvtService {
@Override
public Map<String,Object> queryAll(Map whereJson, Pageable page){
HashMap map = new HashMap();
map.put("flag", "1");
if (whereJson.get("point_code")!=null)
map.put("point_code", "%" + whereJson.get("point_code") + "%");
map.put("point_status", whereJson.get("point_status"));
map.put("product_area", whereJson.get("product_area"));
map.put("is_used", whereJson.get("is_used"));
map.put("begin_time", whereJson.get("begin_time"));
map.put("end_time", whereJson.get("end_time"));
JSONObject json = WQL.getWO("ST_IVT_HOTPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
return json;
}
@Override
public List<HotPointIvtDto> queryAll(Map whereJson){
WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt");
JSONArray arr = wo.query().getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(HotPointIvtDto.class);
return null;
}
@Override
public HotPointIvtDto findById(Long ivt_id) {
WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt");
JSONObject json = wo.query("ivt_id = '" + ivt_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject( HotPointIvtDto.class);
}
return null;
}
@Override
public HotPointIvtDto findByCode(String code) {
WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt");
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject( HotPointIvtDto.class);
}
return null;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void create(HotPointIvtDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setIvt_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_hotpointivt");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(HotPointIvtDto dto) {
HotPointIvtDto entity = this.findById(dto.getIvt_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName);
WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt");
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_hotpointivt");
for (Long ivt_id: ids) {
JSONObject param = new JSONObject();
param.put("ivt_id", String.valueOf(ivt_id));
param.put("is_delete", "1");
param.put("update_optid", currentUserId);
param.put("update_optname", nickName);
param.put("update_time", now);
wo.update(param);
}
}
}

View File

@@ -0,0 +1,101 @@
package org.nl.wms.pdm.rest;
import com.alibaba.fastjson.JSONObject;
import org.nl.wms.pdm.service.SlittingproductionplanService;
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
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 liuxy
* @date 2022-10-09
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "分切计划管理")
@RequestMapping("/api/slittingproductionplan")
@Slf4j
public class SlittingproductionplanController {
private final SlittingproductionplanService slittingproductionplanService;
@GetMapping
@Log("查询分切计划")
@ApiOperation("查询分切计划")
//@SaCheckPermission("@el.check('slittingproductionplan:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(slittingproductionplanService.queryAll(whereJson, page), HttpStatus.OK);
}
@PostMapping
@Log("新增分切计划")
@ApiOperation("新增分切计划")
//@SaCheckPermission("@el.check('slittingproductionplan:add')")
public ResponseEntity<Object> create(@Validated @RequestBody SlittingproductionplanDto dto) {
slittingproductionplanService.create(dto);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改分切计划")
@ApiOperation("修改分切计划")
//@SaCheckPermission("@el.check('slittingproductionplan:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody SlittingproductionplanDto dto) {
slittingproductionplanService.update(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除分切计划")
@ApiOperation("删除分切计划")
//@SaCheckPermission("@el.check('slittingproductionplan:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
slittingproductionplanService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("上料完成")
@ApiOperation("上料完成")
@PostMapping("/upMaterFinish")
public ResponseEntity<Object> upMaterFinish(@RequestBody JSONObject whereJson) {
slittingproductionplanService.upMaterFinish(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("套管完成")
@ApiOperation("套管完成")
@PostMapping("/caseFinish")
public ResponseEntity<Object> caseFinish(@RequestBody JSONObject whereJson) {
slittingproductionplanService.caseFinish(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("配送完成")
@ApiOperation("配送完成")
@PostMapping("/sendFinish")
public ResponseEntity<Object> sendFinish(@RequestBody JSONObject whereJson) {
slittingproductionplanService.sendFinish(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("强制完成")
@ApiOperation("强制完成")
@PostMapping("/compelFinish")
public ResponseEntity<Object> compelFinish(@RequestBody JSONObject whereJson) {
slittingproductionplanService.compelFinish(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -0,0 +1,102 @@
package org.nl.wms.pdm.service;
import com.alibaba.fastjson.JSONObject;
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
/**
* @author liuxy
* @description 服务接口
* @date 2022-10-09
**/
public interface SlittingproductionplanService {
/**
* 查询数据分页
*
* @param whereJson 条件
* @param page 分页参数
* @return Map<String, Object>
*/
Map<String, Object> queryAll(Map whereJson, Pageable page);
/**
* 查询所有数据不分页
*
* @param whereJson 条件参数
* @return List<SlittingproductionplanDto>
*/
List<SlittingproductionplanDto> queryAll(Map whereJson);
/**
* 根据ID查询
*
* @param workorder_id ID
* @return Slittingproductionplan
*/
SlittingproductionplanDto findById(Long workorder_id);
/**
* 根据编码查询
*
* @param code code
* @return Slittingproductionplan
*/
SlittingproductionplanDto findByCode(String code);
/**
* 创建
*
* @param dto /
*/
void create(SlittingproductionplanDto dto);
/**
* 编辑
*
* @param dto /
*/
void update(SlittingproductionplanDto dto);
/**
* 多选删除
*
* @param ids /
*/
void deleteAll(Long[] ids);
/**
* 上料完成
*
* @param whereJson /
*/
void upMaterFinish(JSONObject whereJson);
/**
* 套管完成
*
* @param whereJson /
*/
void caseFinish(JSONObject whereJson);
/**
* 配送完成
*
* @param whereJson /
*/
void sendFinish(JSONObject whereJson);
/**
* 强制完成
*
* @param whereJson /
*/
void compelFinish(JSONObject whereJson);
}

View File

@@ -0,0 +1,141 @@
package org.nl.wms.pdm.service.dto;
import lombok.Data;
import java.math.BigDecimal;
import java.io.Serializable;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
/**
* @description /
* @author liuxy
* @date 2022-10-09
**/
@Data
public class SlittingproductionplanDto implements Serializable {
/** 分切计划标识 */
/** 防止精度丢失 */
@JsonSerialize(using= ToStringSerializer.class)
private Long workorder_id;
/** 分切订单类型 */
private String order_type;
/** 子卷号 */
private String container_name;
/** 产品编码 */
private String product_name;
/** 产品描述 */
private String description;
/** 来源母卷号 */
private String parent_container_name;
/** 改制来源子卷号 */
private String restruct_container_name;
/** 子卷立库木箱号 */
private String package_box_sn;
/** 来源卷位置 */
private String ware_house;
/** 分切机台编码 */
private String resource_name;
/** 分切组 */
private String split_group;
/** 生产顺序 */
private BigDecimal manufacture_sort;
/** 生产订单 */
private String mfg_order_name;
/** 生产日期 */
private String manufacture_date;
/** 管件类型 */
private String paper_tube_or_FRP;
/** 纸筒物料编码 */
private String paper_tube_material;
/** 纸筒物料描述 */
private String paper_tube_description;
/** 纸筒规格 */
private String paper_tube_model;
/** FRP管物料编码 */
private String FRP_material;
/** FRP管物料描述 */
private String FRP_description;
/** FRP管规格 */
private String FRP_model;
/** 子卷幅宽 */
private BigDecimal split_breadth;
/** 子卷理论长度 */
private BigDecimal split_height;
/** 子卷理论重量 */
private BigDecimal split_weight;
/** 开始时间 */
private String start_time;
/** 结束时间 */
private String end_time;
/** 状态 */
private String status;
/** 备注 */
private String remark;
/** 创建人 */
private Long create_id;
/** 创建人姓名 */
private String create_name;
/** 创建时间 */
private String create_time;
/** 修改人 */
private Long update_optid;
/** 修改人姓名 */
private String update_optname;
/** 修改时间 */
private String update_time;
/** 部门ID */
private Long sysdeptid;
/** 公司ID */
private Long syscompanyid;
/** 是否删除 */
private String is_delete;
/** 上料完成 */
private String is_parent_ok;
/** 子卷套轴完成 */
private String is_child_tz_ok;
/** 子卷配送完成 */
private String is_child_ps_ok;
/** 气涨轴编码 */
private String qzzno;
}

View File

@@ -156,7 +156,7 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
JSONObject json = tab.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
json.put("status", "02");
json.put("status", "2");
json.put("finish_type", "02");
json.put("realend_time", DateUtil.now());
json.put("update_optid", currentUserId);

View File

@@ -0,0 +1,238 @@
package org.nl.wms.pdm.service.impl;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
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.pdm.service.SlittingproductionplanService;
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
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 liuxy
* @description 服务实现
* @date 2022-10-09
**/
@Service
@RequiredArgsConstructor
@Slf4j
public class SlittingproductionplanServiceImpl implements SlittingproductionplanService {
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
String order_type = MapUtil.getStr(whereJson, "order_type");
String product_area = MapUtil.getStr(whereJson, "product_area");
String status = MapUtil.getStr(whereJson, "status");
String resource_name = MapUtil.getStr(whereJson, "resource_name");
String parent_container_name = MapUtil.getStr(whereJson, "parent_container_name");
String container_name = MapUtil.getStr(whereJson, "container_name");
String begin_time = MapUtil.getStr(whereJson, "begin_time");
String end_time = MapUtil.getStr(whereJson, "end_time");
JSONObject map = new JSONObject();
map.put("flag", "1");
map.put("order_type", order_type);
map.put("product_area", product_area);
map.put("status", status);
map.put("begin_time", begin_time);
map.put("end_time", end_time);
if (ObjectUtil.isNotEmpty(resource_name)) map.put("resource_name","%"+resource_name+"%");
if (ObjectUtil.isNotEmpty(parent_container_name)) map.put("parent_container_name","%"+parent_container_name+"%");
if (ObjectUtil.isNotEmpty(container_name)) map.put("container_name","%"+container_name+"%");
JSONObject json = WQL.getWO("PDM_BI_SLIDTTINGPLAN_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "plan.update_time DESC");
return json;
}
@Override
public List<SlittingproductionplanDto> queryAll(Map whereJson) {
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan");
JSONArray arr = wo.query().getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(SlittingproductionplanDto.class);
return null;
}
@Override
public SlittingproductionplanDto findById(Long workorder_id) {
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan");
JSONObject json = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)) {
return json.toJavaObject(SlittingproductionplanDto.class);
}
return null;
}
@Override
public SlittingproductionplanDto findByCode(String code) {
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan");
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)) {
return json.toJavaObject(SlittingproductionplanDto.class);
}
return null;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void create(SlittingproductionplanDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setWorkorder_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("pdm_bi_slittingproductionplan");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(SlittingproductionplanDto dto) {
SlittingproductionplanDto entity = this.findById(dto.getWorkorder_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName);
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan");
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("pdm_bi_slittingproductionplan");
for (Long workorder_id : ids) {
JSONObject param = new JSONObject();
param.put("workorder_id", String.valueOf(workorder_id));
param.put("is_delete", "1");
param.put("update_optid", currentUserId);
param.put("update_optname", nickName);
param.put("update_time", now);
wo.update(param);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void upMaterFinish(JSONObject whereJson) {
JSONArray data = whereJson.getJSONArray("data");
Long currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
for (int i = 0; i < data.size(); i++) {
JSONObject json = data.getJSONObject(i);
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
jsonObject.put("is_parent_ok","1");
jsonObject.put("update_optid",currentUserId);
jsonObject.put("update_optname",currentUsername);
jsonObject.put("update_time",DateUtil.now());
tab.update(jsonObject);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void caseFinish(JSONObject whereJson) {
JSONArray data = whereJson.getJSONArray("data");
Long currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
for (int i = 0; i < data.size(); i++) {
JSONObject json = data.getJSONObject(i);
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
jsonObject.put("is_child_tz_ok","1");
jsonObject.put("update_optid",currentUserId);
jsonObject.put("update_optname",currentUsername);
jsonObject.put("update_time",DateUtil.now());
tab.update(jsonObject);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void sendFinish(JSONObject whereJson) {
JSONArray data = whereJson.getJSONArray("data");
Long currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
for (int i = 0; i < data.size(); i++) {
JSONObject json = data.getJSONObject(i);
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
jsonObject.put("is_child_ps_ok","1");
jsonObject.put("update_optid",currentUserId);
jsonObject.put("update_optname",currentUsername);
jsonObject.put("update_time",DateUtil.now());
tab.update(jsonObject);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void compelFinish(JSONObject whereJson) {
JSONArray data = whereJson.getJSONArray("data");
Long currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
for (int i = 0; i < data.size(); i++) {
JSONObject json = data.getJSONObject(i);
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
if (StrUtil.equals(jsonObject.getString("status"), "2")) {
throw new BadRequestException("此单号:"+jsonObject.getString("mfg_order_name")+"已完成");
}
jsonObject.put("status","2");
jsonObject.put("end_time",DateUtil.now());
jsonObject.put("update_optid",currentUserId);
jsonObject.put("update_optname",currentUsername);
jsonObject.put("update_time",DateUtil.now());
tab.update(jsonObject);
}
}
}

View File

@@ -0,0 +1,94 @@
[交易说明]
交易名: 分切计划查询
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.order_type TYPEAS s_string
输入.product_area TYPEAS s_string
输入.status TYPEAS s_string
输入.resource_name TYPEAS s_string
输入.parent_container_name TYPEAS s_string
输入.container_name TYPEAS s_string
输入.begin_time TYPEAS s_string
输入.end_time TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
PAGEQUERY
SELECT
plan.*,
ivt.product_area
FROM
PDM_BI_SlittingProductionPlan plan
LEFT JOIN ST_IVT_CutPointIvt ivt ON ivt.ext_code = plan.resource_name
WHERE
plan.is_delete = '0'
OPTION 输入.order_type <> ""
plan.order_type = 输入.order_type
ENDOPTION
OPTION 输入.product_area <> ""
ivt.product_area = 输入.product_area
ENDOPTION
OPTION 输入.status <> ""
plan.status = 输入.status
ENDOPTION
OPTION 输入.resource_name <> ""
plan.resource_name like 输入.resource_name
ENDOPTION
OPTION 输入.parent_container_name <> ""
plan.parent_container_name like 输入.parent_container_name
ENDOPTION
OPTION 输入.container_name <> ""
plan.container_name like 输入.container_name
ENDOPTION
OPTION 输入.begin_time <> ""
plan.manufacture_date >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
plan.manufacture_date <= 输入.end_time
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF

View File

@@ -0,0 +1,86 @@
[交易说明]
交易名: 冷却区点位库存
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.point_code TYPEAS s_string
输入.container_name TYPEAS s_string
输入.full_point_status TYPEAS s_string
输入.empty_point_status TYPEAS s_string
输入.cool_ivt_status TYPEAS s_string
输入.product_area TYPEAS s_string
输入.is_used TYPEAS s_string
输入.begin_time TYPEAS s_string
输入.end_time TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
PAGEQUERY
SELECT
cool.*
FROM
st_ivt_coolpointivt cool
WHERE
1=1
OPTION 输入.point_code <> ""
point_code LIKE 输入.point_code
ENDOPTION
OPTION 输入.container_name <> ""
container_name LIKE 输入.container_name
ENDOPTION
OPTION 输入.full_point_status <> ""
full_point_status = 输入.full_point_status
ENDOPTION
OPTION 输入.empty_point_status <> ""
empty_point_status = 输入.empty_point_status
ENDOPTION
OPTION 输入.cool_ivt_status <> ""
cool_ivt_status = 输入.cool_ivt_status
ENDOPTION
OPTION 输入.product_area <> ""
product_area = 输入.product_area
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

View File

@@ -0,0 +1,70 @@
[交易说明]
交易名: 分切区点位库存
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.point_code TYPEAS s_string
输入.full_point_status TYPEAS s_string
输入.empty_point_status TYPEAS s_string
输入.product_area TYPEAS s_string
输入.is_used TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
PAGEQUERY
SELECT
cut.*
FROM
st_ivt_cutpointivt cut
WHERE
1=1
OPTION 输入.point_code <> ""
point_code LIKE 输入.point_code
ENDOPTION
OPTION 输入.full_point_status <> ""
full_point_status = 输入.full_point_status
ENDOPTION
OPTION 输入.empty_point_status <> ""
empty_point_status = 输入.empty_point_status
ENDOPTION
OPTION 输入.product_area <> ""
product_area = 输入.product_area
ENDOPTION
OPTION 输入.is_used <> ""
is_used = 输入.is_used
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF

View File

@@ -0,0 +1,74 @@
[交易说明]
交易名: 烘烤区点位库存
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.point_code TYPEAS s_string
输入.point_status TYPEAS s_string
输入.product_area TYPEAS s_string
输入.is_used TYPEAS s_string
输入.begin_time TYPEAS s_string
输入.end_time TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
PAGEQUERY
SELECT
hot.*
FROM
st_ivt_hotpointivt hot
WHERE
1=1
OPTION 输入.point_code <> ""
point_code LIKE 输入.point_code
ENDOPTION
OPTION 输入.point_status <> ""
point_status = 输入.point_status
ENDOPTION
OPTION 输入.product_area <> ""
product_area = 输入.product_area
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