opt:修改分切下料、穿拔轴区域等功能
This commit is contained in:
@@ -96,14 +96,35 @@
|
||||
)
|
||||
</select>
|
||||
<select id="getCachePointSame" resultType="org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt">
|
||||
SELECT bc.*
|
||||
FROM bst_ivt_cutpointivt bc
|
||||
LEFT JOIN pdm_bi_slittingproductionplan p
|
||||
ON IFNULL(p.qzzno, '') <![CDATA[ <> ]]> '' AND (p.qzzno = bc.qzz_no1 OR p.qzzno = bc.qzz_no2)
|
||||
WHERE bc.point_type = '1'
|
||||
AND bc.point_status = '2'
|
||||
AND (IFNULL(bc.qzz_no1, '') <![CDATA[ <> ]]> '' OR IFNULL(bc.qzz_no2, '') <![CDATA[ <> ]]> ''
|
||||
)
|
||||
AND (IFNULL(bc.qzz_no1, '') = '' OR IFNULL(bc.qzz_no2, '') = '')
|
||||
AND p.resource_name = #{resource_name}
|
||||
AND p.parent_container_name = #{parent_container_name}
|
||||
AND p.split_group = #{split_group}
|
||||
AND p.is_delete = '0'
|
||||
AND bc.is_used = '1'
|
||||
UNION
|
||||
SELECT bc.*
|
||||
FROM bst_ivt_cutpointivt bc
|
||||
LEFT JOIN pdm_bi_slittingproductionplan p ON p.qzzno = bc.qzz_no1 OR p.qzzno = bc.qzz_no2
|
||||
WHERE bc.point_type = '1' AND bc.point_status = '2' AND (IFNULL(bc.qzz_no1,'') <![CDATA[ <> ]]> '' OR IFNULL(bc.qzz_no2,'') <![CDATA[ <> ]]> ''
|
||||
) AND (IFNULL(bc.qzz_no1,'') = '' OR IFNULL(bc.qzz_no2,'') = '')
|
||||
AND p.resource_name = #{resource_name}
|
||||
AND (p.restruct_container_name = #{parent_container_name} OR p.parent_container_name = #{parent_container_name})
|
||||
AND p.split_group = #{split_group}
|
||||
LEFT JOIN pdm_bi_slittingproductionplan p
|
||||
ON IFNULL(p.qzzno, '') <![CDATA[ <> ]]> '' AND (p.qzzno = bc.qzz_no1 OR p.qzzno = bc.qzz_no2)
|
||||
WHERE bc.point_type = '1'
|
||||
AND bc.point_status = '2'
|
||||
AND (IFNULL(bc.qzz_no1, '') <![CDATA[ <> ]]> '' OR IFNULL(bc.qzz_no2, '') <![CDATA[ <> ]]> ''
|
||||
)
|
||||
AND (IFNULL(bc.qzz_no1, '') = '' OR IFNULL(bc.qzz_no2, '') = '')
|
||||
AND p.resource_name = #{resource_name}
|
||||
AND p.restruct_container_name = #{parent_container_name}
|
||||
AND p.split_group = #{split_group}
|
||||
AND p.is_delete = '0'
|
||||
AND bc.is_used = '1'
|
||||
</select>
|
||||
<select id="getReallyQzzSameDevice"
|
||||
resultType="org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt">
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.nl.b_lms.bst.ivt.paper.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.IMdPbPaperService;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.dao.MdPbPaper;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/mdPbPaper")
|
||||
public class MdPbPaperController {
|
||||
|
||||
@Autowired
|
||||
private IMdPbPaperService mdPbPaperService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询管芯库存")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(mdPbPaperService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增管芯库存")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody MdPbPaper entity){
|
||||
mdPbPaperService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改管芯库存")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody MdPbPaper entity){
|
||||
mdPbPaperService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除管芯库存")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
mdPbPaperService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/print")
|
||||
@Log("打印")
|
||||
public ResponseEntity<Object> print( @RequestBody List<MdPbPaper> list){
|
||||
mdPbPaperService.print(list);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.nl.b_lms.bst.ivt.paper.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.dao.MdPbPaper;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
public interface IMdPbPaperService extends IService<MdPbPaper> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<MdPbPapervehicle>
|
||||
*/
|
||||
IPage<MdPbPaper> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(MdPbPaper entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(MdPbPaper entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param list /
|
||||
*/
|
||||
void print(List<MdPbPaper> list);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.nl.b_lms.bst.ivt.paper.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_pb_paper")
|
||||
public class MdPbPaper implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 载具标识 */
|
||||
@TableId(value = "ivt_id", type = IdType.NONE)
|
||||
private String ivt_id;
|
||||
|
||||
/**
|
||||
* FRP管/纸管编码
|
||||
*/
|
||||
private String paper_code;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* FRP管/纸管理论重量
|
||||
*/
|
||||
private BigDecimal standard_weight;
|
||||
|
||||
/**
|
||||
* FRP管/纸管实际重量
|
||||
*/
|
||||
private BigDecimal fact_weight;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.b_lms.bst.ivt.paper.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.dao.MdPbPaper;
|
||||
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
public interface MdPbPaperMapper extends BaseMapper<MdPbPaper> {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?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.b_lms.bst.ivt.paper.service.dao.mapper.MdPbPaperMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,109 @@
|
||||
package org.nl.b_lms.bst.ivt.paper.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.IMdPbPaperService;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.dao.MdPbPaper;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.dao.mapper.MdPbPaperMapper;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.pda.st.service.impl.PrintServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MdPbPaperServiceImpl extends ServiceImpl<MdPbPaperMapper, MdPbPaper> implements IMdPbPaperService {
|
||||
|
||||
@Resource
|
||||
private MdPbPaperMapper mdPbPaperMapper;
|
||||
|
||||
@Override
|
||||
public IPage<MdPbPaper> queryAll(Map whereJson, PageQuery page){
|
||||
String paper_code = (String) whereJson.get("paper_code");
|
||||
LambdaQueryWrapper<MdPbPaper> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq( ObjectUtil.isNotEmpty(paper_code),MdPbPaper::getPaper_code,paper_code);
|
||||
IPage<MdPbPaper> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
mdPbPaperMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(MdPbPaper entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
String gx_code = CodeUtil.getNewCode("GX_CODE");
|
||||
entity.setPaper_code(gx_code);
|
||||
entity.setIvt_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setUpdate_optid(currentUserId);
|
||||
entity.setUpdate_optname(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
mdPbPaperMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(MdPbPaper entity) {
|
||||
MdPbPaper dto = mdPbPaperMapper.selectById(entity.getIvt_id());
|
||||
if (dto == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败");
|
||||
}
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_optid(currentUserId);
|
||||
entity.setUpdate_optname(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
|
||||
int updateFlag = mdPbPaperMapper.updateById(entity);
|
||||
log.warn("mdPbPaperMapper更新结果:" +updateFlag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
mdPbPaperMapper.deleteBatchIds(ids);
|
||||
}
|
||||
@Override
|
||||
public void print(List<MdPbPaper> list) {
|
||||
|
||||
JSONObject print_info = WQLObject.getWQLObject("pdm_bi_printinfo").query("print_name = 'GXBQ'").uniqueResult(0);
|
||||
|
||||
for(int i=0;i<list.size();i++){
|
||||
MdPbPaper paper = list.get(i);
|
||||
|
||||
JSONObject print_jo = new JSONObject();
|
||||
print_jo.put("paper_code", paper.getPaper_code());
|
||||
print_jo.put("material_code", paper.getMaterial_code());
|
||||
print_jo.put("material_name", paper.getMaterial_name());
|
||||
print_jo.put("standard_weight", paper.getStandard_weight());
|
||||
print_jo.put("print_type", print_info.getString("print_id"));
|
||||
new PrintServiceImpl().gx_print(print_jo);
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.GxQtyDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.service.impl.SlitterServiceImpl;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
|
||||
@@ -35,6 +35,15 @@ public class MdPbPapervehicle implements Serializable {
|
||||
*/
|
||||
private String row_num;
|
||||
|
||||
/**
|
||||
* 列
|
||||
*/
|
||||
private String col_num;
|
||||
/**
|
||||
* 管芯/纸管编码
|
||||
*/
|
||||
private String paper_code;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
*/
|
||||
@@ -48,7 +57,7 @@ public class MdPbPapervehicle implements Serializable {
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
private Integer qty;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
|
||||
@@ -2,11 +2,13 @@ package org.nl.b_lms.bst.ivt.papervehicle.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.paper.service.dao.MdPbPaper;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.IMdPbPapervehicleService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.mapper.MdPbPapervehicleMapper;
|
||||
@@ -38,7 +40,13 @@ public class MdPbPapervehicleServiceImpl extends ServiceImpl<MdPbPapervehicleMap
|
||||
|
||||
@Override
|
||||
public IPage<MdPbPapervehicle> queryAll(Map whereJson, PageQuery page){
|
||||
String paper_code = (String) whereJson.get("paper_code");
|
||||
String vehicle_code = (String) whereJson.get("vehicle_code");
|
||||
String material_code = (String) whereJson.get("material_code");
|
||||
LambdaQueryWrapper<MdPbPapervehicle> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq( ObjectUtil.isNotEmpty(paper_code), MdPbPapervehicle::getPaper_code,paper_code)
|
||||
.eq( ObjectUtil.isNotEmpty(material_code),MdPbPapervehicle::getMaterial_code,material_code)
|
||||
.eq( ObjectUtil.isNotEmpty(vehicle_code),MdPbPapervehicle::getVehicle_code,vehicle_code);
|
||||
IPage<MdPbPapervehicle> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
mdPbPapervehicleMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
|
||||
@@ -101,6 +101,21 @@ public interface IBstIvtShafttubeivtService extends IService<BstIvtShafttubeivt>
|
||||
* @return
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(BstIvtShafttubeivt startPoint);
|
||||
/**
|
||||
* 获取没任务的气涨轴缓存位
|
||||
* @param qzzSize
|
||||
* @param specification
|
||||
* @return
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty2(String qzzSize, String specification);
|
||||
|
||||
/**
|
||||
* 获取没任务的气涨轴缓存位
|
||||
* @param qzzSize
|
||||
* @param specification
|
||||
* @return
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty3(String qzzSize, String specification);
|
||||
|
||||
void setHaveShaft(JSONObject param);
|
||||
|
||||
|
||||
@@ -34,6 +34,24 @@ public interface BstIvtShafttubeivtMapper extends BaseMapper<BstIvtShafttubeivt>
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(@Param("startPoint") BstIvtShafttubeivt startPoint);
|
||||
|
||||
/**
|
||||
* 获取含有气胀轴的气胀轴暂存位
|
||||
* @param qzzSize 气胀轴尺寸
|
||||
* @param specification 标箔/锂电
|
||||
* @return /
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty2(@Param("qzzSize") String qzzSize,
|
||||
@Param("specification") String specification);
|
||||
|
||||
/**
|
||||
* 获取含有气胀轴的气胀轴暂存位
|
||||
* @param qzzSize 气胀轴尺寸
|
||||
* @param specification 标箔/锂电
|
||||
* @return /
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty3(@Param("qzzSize") String qzzSize,
|
||||
@Param("specification") String specification);
|
||||
|
||||
List<BstIvtShafttubeivt> getOtherCBJData(String pointCode, String location);
|
||||
|
||||
List<BstIvtShafttubeivt> getNotTaskEmptyShaftCache(@Param("size") String size,
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
*
|
||||
FROM
|
||||
`bst_ivt_shafttubeivt` bst
|
||||
WHERE bst.point_type = #{type} AND bst.point_location = #{location} AND bst.have_qzz = #{have} AND bst.is_used = '1'
|
||||
WHERE bst.point_type = #{type}
|
||||
<if test="location != null and location !=''">
|
||||
AND bst.point_location = #{location}
|
||||
</if>
|
||||
AND bst.have_qzz = #{have} AND bst.is_used = '1'
|
||||
AND 0 = (
|
||||
SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code2 = bst.point_code
|
||||
)
|
||||
@@ -22,20 +26,6 @@
|
||||
AND bsf.point_location = #{location}
|
||||
AND bsf.parent_code = #{pointCode}
|
||||
</select>
|
||||
<select id="getNotTaskShaftCache"
|
||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT *
|
||||
FROM `bst_ivt_shafttubeivt` b
|
||||
WHERE b.have_qzz = '1'
|
||||
AND b.point_type = '6'
|
||||
AND b.qzz_size = #{qzzSize}
|
||||
<if test="qzzSize != 6">
|
||||
AND b.qzz_generation = #{specification}
|
||||
</if>
|
||||
AND b.point_location = #{location}
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code1 = b.point_code)
|
||||
ORDER BY b.sort_seq DESC
|
||||
</select>
|
||||
<select id="getNotTaskShaftCacheEmpty"
|
||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT *
|
||||
@@ -43,20 +33,44 @@
|
||||
WHERE b.have_qzz = '0'
|
||||
AND b.point_type = '6'
|
||||
AND b.qzz_size = #{startPoint.qzz_size}
|
||||
<if test="startPoint.qzz_size != 6">
|
||||
AND b.qzz_generation = #{startPoint.qzz_generation}
|
||||
</if>
|
||||
AND b.point_location = #{startPoint.point_location}
|
||||
AND b.qzz_generation = #{startPoint.qzz_generation}
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code2 = b.point_code AND t.is_delete = '0')
|
||||
AND 0 = (SELECT COUNT(*) FROM bst_ivt_shafttubeivt bb WHERE bb.have_qzz ='1' AND bb.point_type = '6'
|
||||
<if test="startPoint.qzz_size != 6">
|
||||
AND bb.qzz_generation = #{startPoint.qzz_generation}
|
||||
</if>
|
||||
AND bb.qzz_size = #{startPoint.qzz_size} AND bb.point_location = #{startPoint.point_location} AND bb.sort_seq > b.sort_seq)
|
||||
AND bb.qzz_size = #{startPoint.qzz_size}
|
||||
AND bb.sort_seq > b.sort_seq)
|
||||
ORDER BY b.sort_seq ASC
|
||||
</select>
|
||||
<select id="getNotTaskShaftCacheEmpty2"
|
||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT *
|
||||
FROM `bst_ivt_shafttubeivt` b
|
||||
WHERE b.have_qzz = '0'
|
||||
AND b.point_type = '6'
|
||||
AND b.qzz_size = #{qzzSize}
|
||||
AND b.qzz_generation = #{specification}
|
||||
AND (b.plan <![CDATA[ <> ]]> '1' OR b.plan IS NULL)
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code2 = b.point_code AND t.is_delete = '0')
|
||||
AND 0 = (SELECT COUNT(*) FROM bst_ivt_shafttubeivt bb WHERE bb.have_qzz ='1' AND bb.point_type = '6'
|
||||
AND bb.qzz_generation = #{specification}
|
||||
AND bb.qzz_size = #{qzzSize}
|
||||
AND bb.sort_seq > b.sort_seq)
|
||||
ORDER BY b.sort_seq ASC
|
||||
</select>
|
||||
<select id="getNotTaskShaftCacheEmpty3"
|
||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT *
|
||||
FROM `bst_ivt_shafttubeivt` b
|
||||
WHERE b.have_qzz = '0'
|
||||
AND b.point_type = '6'
|
||||
AND b.plan = '1'
|
||||
AND b.qzz_size = #{qzzSize}
|
||||
AND b.qzz_generation = #{specification}
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code2 = b.point_code AND t.is_delete = '0')
|
||||
ORDER BY b.sort_seq desc
|
||||
</select>
|
||||
<select id="getOtherCBJData" resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
bst_ivt_shafttubeivt bsf
|
||||
@@ -83,6 +97,20 @@
|
||||
AND bb.qzz_size = #{size} AND bb.point_location = #{location} AND bb.sort_seq > b.sort_seq)
|
||||
ORDER BY b.sort_seq ASC
|
||||
</select>
|
||||
<select id="getNotTaskShaftCache"
|
||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT *
|
||||
FROM `bst_ivt_shafttubeivt` b
|
||||
WHERE b.have_qzz = '1'
|
||||
AND b.point_type = '6'
|
||||
AND b.qzz_size = #{qzzSize}
|
||||
AND b.qzz_generation = #{specification}
|
||||
<if test="location != null and location !=''">
|
||||
AND b.point_location = #{location}
|
||||
</if>
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code1 = b.point_code)
|
||||
ORDER BY b.sort_seq DESC
|
||||
</select>
|
||||
<select id="getNotTaskShaftCache2"
|
||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||
SELECT *
|
||||
@@ -90,8 +118,9 @@
|
||||
WHERE b.have_qzz = '1'
|
||||
AND b.point_type = '6'
|
||||
AND b.qzz_size = #{qzzSize}
|
||||
<if test="qzzSize != 6">
|
||||
AND b.qzz_generation = #{specification}
|
||||
AND b.qzz_generation = #{specification}
|
||||
<if test="location != null and location !=''">
|
||||
AND b.point_location = #{location}
|
||||
</if>
|
||||
AND b.point_location = #{location}
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code1 = b.point_code)
|
||||
|
||||
@@ -137,6 +137,16 @@ public class BstIvtShafttubeivtServiceImpl extends ServiceImpl<BstIvtShafttubeiv
|
||||
return bstIvtShafttubeivtMapper.getNotTaskShaftCacheEmpty(startPoint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty2(String qzzSize, String specification) {
|
||||
return bstIvtShafttubeivtMapper.getNotTaskShaftCacheEmpty2(qzzSize, specification);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty3(String qzzSize, String specification) {
|
||||
return bstIvtShafttubeivtMapper.getNotTaskShaftCacheEmpty3(qzzSize, specification);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHaveShaft(JSONObject param) {
|
||||
JSONArray data = param.getJSONArray("data");
|
||||
|
||||
@@ -30,14 +30,12 @@ public class BstIvtStockingivtController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询备货区点位库存表")
|
||||
//@SaCheckPermission("@el.check('bstIvtStockingivt:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(bstIvtStockingivtService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增备货区点位库存表")
|
||||
//@SaCheckPermission("@el.check('bstIvtStockingivt:add')")
|
||||
public ResponseEntity
|
||||
<Object> create(@Validated @RequestBody BstIvtStockingivt entity) {
|
||||
bstIvtStockingivtService.create(entity);
|
||||
@@ -46,14 +44,12 @@ public class BstIvtStockingivtController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改备货区点位库存表")
|
||||
//@SaCheckPermission("@el.check('bstIvtStockingivt:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody BstIvtStockingivt entity) {
|
||||
bstIvtStockingivtService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除备货区点位库存表")
|
||||
//@SaCheckPermission("@el.check('bstIvtStockingivt:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
bstIvtStockingivtService.deleteAll(ids);
|
||||
@@ -61,14 +57,12 @@ public class BstIvtStockingivtController {
|
||||
}
|
||||
|
||||
@Log("操作管芯托盘库存")
|
||||
//@SaCheckPermission("@el.check('bstIvtStockingivt:del')")
|
||||
@PostMapping("operateIvt")
|
||||
public ResponseEntity<Object> operateIvt(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(bstIvtStockingivtService.operateIvt(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("管芯托盘库存")
|
||||
//@SaCheckPermission("@el.check('bstIvtStockingivt:del')")
|
||||
@Log("查询管芯托盘库存明细")
|
||||
@PostMapping("/showDetail")
|
||||
public ResponseEntity<Object> showDetail(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(bstIvtStockingivtService.showDetail(param), HttpStatus.OK);
|
||||
|
||||
@@ -60,11 +60,10 @@ public interface IBstIvtStockingivtService extends IService<BstIvtStockingivt> {
|
||||
|
||||
/**
|
||||
* 获取备货区空位,没有任务的位置
|
||||
* @param location 位置:0上区域,1下区域
|
||||
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||
* @return /
|
||||
*/
|
||||
List<BstIvtStockingivt> getEmptyPointNotTask(String location, String pointType);
|
||||
List<BstIvtStockingivt> getEmptyPointNotTask(String pointType);
|
||||
|
||||
/**
|
||||
* 根据点位编码获取备货区点位
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.b_lms.bst.ivt.stockingivt.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dto.ShowStockView;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubeMovePointDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubePointDto;
|
||||
|
||||
@@ -24,11 +25,10 @@ public interface BstIvtStockingivtMapper extends BaseMapper<BstIvtStockingivt> {
|
||||
List<BstIvtStockingivt> getPaperTubePoint(String pointType, String tube, String location, int qty);
|
||||
/**
|
||||
* 获取备货区空位,没有任务的位置
|
||||
* @param location 位置:0上区域,1下区域
|
||||
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||
* @return /
|
||||
*/
|
||||
List<BstIvtStockingivt> getEmptyPointNotTask(String location, String pointType);
|
||||
List<BstIvtStockingivt> getEmptyPointNotTask(String pointType);
|
||||
|
||||
BstIvtStockingivt getCanMovePointOne(String location, String pointType);
|
||||
|
||||
@@ -42,4 +42,6 @@ public interface BstIvtStockingivtMapper extends BaseMapper<BstIvtStockingivt> {
|
||||
List<BhTubePointDto> getNeedPaperTubePoint(String pointType, String tube, String location);
|
||||
|
||||
List<BhTubeMovePointDto> getCanMovePointList(String location, String pointType);
|
||||
|
||||
List<ShowStockView> showPapervehicleView(String product_area, String material_code);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
SELECT bs.*
|
||||
FROM `bst_ivt_stockingivt` bs
|
||||
WHERE bs.point_type = #{pointType}
|
||||
AND bs.point_location = #{location}
|
||||
AND bs.is_used = '1'
|
||||
AND bs.ivt_status = '0'
|
||||
AND 0 = (SELECT COUNT(*)
|
||||
@@ -90,4 +89,32 @@
|
||||
ORDER BY ivt_status ASC,
|
||||
qty ASC;
|
||||
</select>
|
||||
|
||||
<select id="showPapervehicleView" resultType="org.nl.b_lms.bst.ivt.stockingivt.service.dto.ShowStockView">
|
||||
SELECT
|
||||
p.vehicle_code,
|
||||
p.material_code,
|
||||
p.material_name,
|
||||
sum( p.qty ) AS total_num,
|
||||
MAX( bs.point_code ) AS point_code,
|
||||
MAX( bs.product_area ) AS product_area,
|
||||
MAX( dict.label ) as product_area_name
|
||||
FROM
|
||||
`md_pb_papervehicle` p
|
||||
INNER JOIN bst_ivt_stockingivt bs ON p.vehicle_code = bs.vehicle_code
|
||||
LEFT JOIN sys_dict dict ON (dict.value = bs.product_area and dict.code='stockingivt_product_area')
|
||||
WHERE
|
||||
1 = 1
|
||||
and bs.product_area = #{product_area}
|
||||
AND p.material_code = #{material_code}
|
||||
AND bs.point_type <![CDATA[ <> ]]> '0'
|
||||
and bs.is_used = '1'
|
||||
GROUP BY
|
||||
p.vehicle_code,
|
||||
p.material_code,
|
||||
p.material_name
|
||||
ORDER BY
|
||||
p.vehicle_code,
|
||||
p.material_code
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.nl.b_lms.bst.ivt.stockingivt.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: zds
|
||||
* @Date: 2025/3/20
|
||||
*/
|
||||
@Data
|
||||
public class ShowStockView {
|
||||
/**
|
||||
* 托盘编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 管芯编码
|
||||
*/
|
||||
private String material_code;
|
||||
//管芯名称
|
||||
private String material_name;
|
||||
//数量
|
||||
private String total_num;
|
||||
//点位编码
|
||||
private String point_code;
|
||||
//区域
|
||||
private String product_area;
|
||||
//区域名称
|
||||
private String product_area_name;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.nl.b_lms.pda.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.IBstIvtStockingivtService;
|
||||
import org.nl.b_lms.pda.service.StockingIvtService;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author: zds
|
||||
* @Description:
|
||||
* @Date: 2024/5/30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pda/stockingivt")
|
||||
@Slf4j
|
||||
public class StockingIvtController {
|
||||
|
||||
@Autowired
|
||||
private StockingIvtService stockingIvtService;
|
||||
|
||||
@Autowired
|
||||
private IBstIvtStockingivtService bstIvtStockingivtService;
|
||||
|
||||
@PostMapping("/queryProductArea")
|
||||
@Log("查询生产区域")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryProductArea(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(stockingIvtService.queryProductArea(), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/doStockAreaBinding")
|
||||
@Log("手持备货区托盘点位绑定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> doStockAreaBinding(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(stockingIvtService.doStockAreaBinding(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/doStockAreaUnbinding")
|
||||
@Log("手持备货区托盘点位解除绑定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> doStockAreaUnbinding(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(stockingIvtService.doStockAreaUnbinding(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/instorStock")
|
||||
@Log("手持入管芯库")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> instorStock(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(stockingIvtService.instorStock(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/showPapervehicleView")
|
||||
@Log("查询管芯库存情况")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> showPapervehicleView(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(stockingIvtService.showPapervehicleView(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveStock")
|
||||
@Log("手持管芯备货")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> moveStock(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(stockingIvtService.moveStock(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("操作管芯托盘库存")
|
||||
@PostMapping("operateIvt")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> operateIvt(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(bstIvtStockingivtService.operateIvt(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.nl.b_lms.pda.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dto.ShowStockView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: zds
|
||||
* @Description:
|
||||
* @Date: 2024/5/30
|
||||
*/
|
||||
public interface StockingIvtService {
|
||||
/**
|
||||
* 手持备货区绑定
|
||||
* @param param /
|
||||
* @return /
|
||||
*/
|
||||
JSONObject doStockAreaBinding(JSONObject param);
|
||||
/**
|
||||
* 手持备货区解除绑定
|
||||
* @param param /
|
||||
* @return /
|
||||
*/
|
||||
JSONObject doStockAreaUnbinding(JSONObject param);
|
||||
/**
|
||||
* 手持入管芯库
|
||||
* @param param /
|
||||
* @return /
|
||||
*/
|
||||
JSONObject instorStock(JSONObject param);
|
||||
|
||||
/**
|
||||
* 查看人工套轴信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
JSONObject showPapervehicleView(JSONObject param);
|
||||
|
||||
/**
|
||||
* 手持管芯备货
|
||||
* @param param /
|
||||
* @return /
|
||||
*/
|
||||
JSONObject moveStock(JSONObject param);
|
||||
|
||||
/**
|
||||
* 查询生产区域
|
||||
*
|
||||
* @return json
|
||||
*/
|
||||
JSONObject queryProductArea();
|
||||
|
||||
JSONObject operateIvt(JSONObject jsonObject) ;
|
||||
}
|
||||
@@ -0,0 +1,420 @@
|
||||
package org.nl.b_lms.pda.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.IMdPbPapervehicleService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.IBstIvtStockingivtService;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.mapper.BstIvtStockingivtMapper;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dto.ShowStockView;
|
||||
import org.nl.b_lms.pda.service.StockingIvtService;
|
||||
import org.nl.b_lms.sch.tasks.slitter.InstorStockAgvTask;
|
||||
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterEnum;
|
||||
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.utils.TaskUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
||||
import org.nl.wms.basedata.master.service.MaterialbaseService;
|
||||
import org.nl.wms.basedata.master.service.dto.MaterialbaseDto;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: zds
|
||||
* @Description:
|
||||
* @Date: 2024/5/30
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class StockingIvtServiceImpl implements StockingIvtService {
|
||||
@Autowired
|
||||
private BstIvtStockingivtMapper bstIvtStockingivtMapper;
|
||||
@Autowired
|
||||
private IBstIvtStockingivtService stockingivtService;
|
||||
@Autowired
|
||||
private InstorStockAgvTask instorStockAgvTask;
|
||||
@Autowired
|
||||
private SysDictMapper sysDictMapper;
|
||||
@Autowired
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
@Autowired
|
||||
private IMdPbPapervehicleService papervehicleService;
|
||||
@Autowired
|
||||
private MaterialbaseService materialbaseService;
|
||||
|
||||
@Override
|
||||
public JSONObject doStockAreaBinding(JSONObject param) {
|
||||
// param: point_code vehicle_code
|
||||
log.info("手持备货区绑定的数据:{}", param);
|
||||
String pointCode = param.getString("point_code");
|
||||
String vehicleCode = param.getString("vehicle_code");
|
||||
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(pointCode, true);
|
||||
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||
throw new BadRequestException("点位 [" + pointCode + "] 不存在或者已被禁用!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(vehicleCode)) {
|
||||
throw new BadRequestException("托盘信息不能为空!");
|
||||
}
|
||||
if (!vehicleCode.contains("GX")) {
|
||||
throw new BadRequestException("请扫描或输入正确的托盘码!");
|
||||
}
|
||||
LambdaQueryWrapper<BstIvtStockingivt> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq(BstIvtStockingivt::getVehicle_code, vehicleCode)
|
||||
.eq(BstIvtStockingivt::getIs_used, SlitterConstant.SLITTER_YES);
|
||||
BstIvtStockingivt old = bstIvtStockingivtMapper.selectOne(lam);
|
||||
if (ObjectUtil.isNotEmpty(old)) {
|
||||
throw new BadRequestException("当前托盘:" + vehicleCode + "已绑定在点位:" + old.getPoint_code() + "上,不允许重复绑定!");
|
||||
}
|
||||
//判断是否已经下发了任务
|
||||
JSONObject task1 = isSingleTask(pointCode);
|
||||
if ( ObjectUtil.isNotEmpty(task1)) {
|
||||
throw new BadRequestException("点位:" + pointCode + "存在未完成的任务:"+task1.getString("task_code"));
|
||||
}
|
||||
pointByCode.setVehicle_code(vehicleCode);
|
||||
pointByCode.setIvt_status("1");
|
||||
TaskUtils.updateOptMessageByBStockingPoint(pointByCode);
|
||||
stockingivtService.updateById(pointByCode);
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "备货区绑定成功!");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject doStockAreaUnbinding(JSONObject param) {
|
||||
// param: point_code
|
||||
log.info("手持备货区解除绑定的数据:{}", param);
|
||||
String pointCode = param.getString("point_code");
|
||||
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(pointCode, true);
|
||||
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||
throw new BadRequestException("点位 [" + pointCode + "] 不存在或者已被禁用!");
|
||||
}
|
||||
//判断是否已经下发了任务
|
||||
JSONObject task1 = isSingleTask(pointCode);
|
||||
if ( ObjectUtil.isNotEmpty(task1)) {
|
||||
throw new BadRequestException("点位:" + pointCode + "存在未完成的任务:"+task1.getString("task_code"));
|
||||
}
|
||||
pointByCode.setVehicle_code("");
|
||||
pointByCode.setIvt_status("0");
|
||||
TaskUtils.updateOptMessageByBStockingPoint(pointByCode);
|
||||
stockingivtService.updateById(pointByCode);
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "备货区解绑成功!");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject instorStock(JSONObject jo) {
|
||||
// param: point_code vehicle_code
|
||||
log.info("手持入管芯库的数据:{}", jo);
|
||||
String pointCode = jo.getString("point_code");
|
||||
String vehicleCode = jo.getString("vehicle_code");
|
||||
//入库,operate_type=1
|
||||
String operate_type = jo.getString("operate_type");
|
||||
|
||||
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(pointCode, true);
|
||||
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||
throw new BadRequestException("点位 [" + pointCode + "] 不存在或者已被禁用!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(vehicleCode)) {
|
||||
throw new BadRequestException("托盘信息不能为空!");
|
||||
}
|
||||
if (!vehicleCode.contains("GX")) {
|
||||
throw new BadRequestException("请扫描或输入正确的托盘码!");
|
||||
}
|
||||
//点位类型必须为入库点,point_type = 0
|
||||
String point_type = pointByCode.getPoint_type();
|
||||
if (!point_type.equals("0")) {
|
||||
throw new BadRequestException("请扫描管芯库入库点!");
|
||||
}
|
||||
//校验所扫点位上托盘是否和扫码托盘一致
|
||||
if (!vehicleCode.equals(pointByCode.getVehicle_code())) {
|
||||
throw new BadRequestException("点位:"+pointCode+"已存在托盘"+pointByCode.getVehicle_code()+",与扫码托盘不一致!");
|
||||
}
|
||||
//判断是否已经下发了任务
|
||||
JSONObject task1 = isSingleTask(pointCode);
|
||||
if ( ObjectUtil.isNotEmpty(task1)) {
|
||||
throw new BadRequestException("点位:" + pointCode + "存在未完成的任务:"+task1.getString("task_code"));
|
||||
}
|
||||
//生成管芯入库agv任务,两个点
|
||||
List<BstIvtStockingivt> list = stockingivtService.getEmptyPointNotTask("1");
|
||||
if (list.size() == 0) {
|
||||
throw new BadRequestException("管芯库无空闲点位!");
|
||||
}
|
||||
BstIvtStockingivt endPoint = list.get(0);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", pointByCode.getPoint_code());
|
||||
param.put("point_code2", endPoint.getPoint_code());
|
||||
param.put("vehicle_code", vehicleCode);
|
||||
param.put("task_type", SlitterEnum.TASK_TYPE.code("托盘入管芯库任务"));
|
||||
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||
instorStockAgvTask.createTask(param);
|
||||
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "入管芯库任务生成成功!");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject showPapervehicleView(JSONObject param) {
|
||||
JSONObject jo = new JSONObject();
|
||||
String product_area = param.getString("product_area");
|
||||
String material_code = param.getString("material_code");
|
||||
List<ShowStockView> list = bstIvtStockingivtMapper.showPapervehicleView(product_area,material_code);
|
||||
log.info("showPapervehicleView数据size:{}", list.size());
|
||||
jo.put("rows", list);
|
||||
jo.put("status", HttpStatus.HTTP_OK);
|
||||
jo.put("message", "查询成功!");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject moveStock(JSONObject jo) {
|
||||
// param: point_code vehicle_code
|
||||
log.info("手持管芯备货的数据:{}", jo);
|
||||
String pointCode = jo.getString("point_code");
|
||||
String vehicleCode = jo.getString("vehicle_code");
|
||||
|
||||
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(pointCode, true);
|
||||
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||
throw new BadRequestException("点位 [" + pointCode + "] 不存在或者已被禁用!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(vehicleCode)) {
|
||||
throw new BadRequestException("托盘信息不能为空!");
|
||||
}
|
||||
//点位类型必须为入库点,point_type = 1
|
||||
String point_type = pointByCode.getPoint_type();
|
||||
if (!point_type.equals("1")) {
|
||||
throw new BadRequestException("请选择管芯库点位!");
|
||||
}
|
||||
//判断是否已经下发了任务
|
||||
JSONObject task1 = isSingleTask(pointCode);
|
||||
if ( ObjectUtil.isNotEmpty(task1)) {
|
||||
throw new BadRequestException("点位:" + pointCode + "存在未完成的任务:"+task1.getString("task_code"));
|
||||
}
|
||||
//生成管芯入库agv任务,两个点
|
||||
List<BstIvtStockingivt> list = stockingivtService.getEmptyPointNotTask("3");
|
||||
if (list.size() >= 2) {
|
||||
throw new BadRequestException("备货区无空闲点位!");
|
||||
}
|
||||
BstIvtStockingivt endPoint = list.get(0);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", pointByCode.getPoint_code());
|
||||
param.put("point_code2", endPoint.getPoint_code());
|
||||
param.put("vehicle_code", vehicleCode);
|
||||
param.put("task_type", SlitterEnum.TASK_TYPE.code("管芯备货任务"));
|
||||
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||
instorStockAgvTask.createTask(param);
|
||||
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "管芯备货任务生成成功!");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryProductArea() {
|
||||
JSONObject jo = new JSONObject();
|
||||
|
||||
LambdaQueryWrapper<Dict> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq(Dict::getCode, "stockingivt_product_area")
|
||||
.isNotNull(Dict::getLabel)
|
||||
.ne(Dict::getLabel, "")
|
||||
.orderBy(true, true, Dict::getDict_sort);
|
||||
List<Dict> ret = sysDictMapper.selectList(lam);
|
||||
|
||||
JSONArray ja = new JSONArray();
|
||||
for(int i=0;i<ret.size();i++){
|
||||
Dict dict = ret.get(i);
|
||||
JSONObject new_jo = new JSONObject();
|
||||
new_jo.put("text",dict.getLabel());
|
||||
new_jo.put("value",dict.getValue());
|
||||
ja.add(new_jo);
|
||||
}
|
||||
jo.put("rows", ja);
|
||||
jo.put("status", HttpStatus.HTTP_OK);
|
||||
jo.put("message", "查询成功!");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject operateIvt(JSONObject jsonObject) {
|
||||
log.info("手持操作管芯托盘 - {}", jsonObject);
|
||||
//载具托盘号
|
||||
String vehicle_code = jsonObject.getString("vehicle_code");
|
||||
//排
|
||||
String row_num = jsonObject.getString("row_num");
|
||||
//列
|
||||
String col_num = jsonObject.getString("col_num");
|
||||
//物料
|
||||
String material_code = jsonObject.getString("material_code");
|
||||
//管芯/纸管编码
|
||||
String paper_code = jsonObject.getString("paper_code");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
//1-绑定;2-清除
|
||||
String type = jsonObject.getString("type");
|
||||
if (type.equals("1")) {
|
||||
if (ObjectUtil.isEmpty(vehicle_code)) {
|
||||
throw new BadRequestException("托盘信息不能为空!");
|
||||
}
|
||||
if(!vehicle_code.contains("GX")){
|
||||
throw new BadRequestException("请扫描或输入正确的托盘码!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(material_code)) {
|
||||
throw new BadRequestException("物料不能为空!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(paper_code)) {
|
||||
throw new BadRequestException("管芯/纸管编码不能为空!");
|
||||
}
|
||||
MaterialbaseDto mater = materialbaseService.findByCode(material_code);
|
||||
String material_name = mater.getMaterial_name();
|
||||
//查询当前载具和排是否存在库存
|
||||
MdPbPapervehicle papervehicle = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>().eq(MdPbPapervehicle::getVehicle_code, vehicle_code)
|
||||
.eq(MdPbPapervehicle::getRow_num, row_num).eq(MdPbPapervehicle::getCol_num, col_num));
|
||||
if (ObjectUtil.isNotEmpty(papervehicle) && !papervehicle.getMaterial_code().equals(material_code)) {
|
||||
throw new BadRequestException("当前排-列已有物料为【" + papervehicle.getMaterial_code() + "】,如需要修改请先清除库存,再进行绑定!");
|
||||
}
|
||||
//查询当前管芯编码是否在托盘中
|
||||
MdPbPapervehicle papervehicle_flag = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>()
|
||||
.eq(MdPbPapervehicle::getPaper_code, paper_code));
|
||||
if (ObjectUtil.isNotEmpty(papervehicle_flag)) {
|
||||
throw new BadRequestException("当前管芯编码已存在托盘上:" + papervehicle_flag.getVehicle_code() + "所在位置排列:"+papervehicle_flag.getRow_num()+"-"+papervehicle_flag.getCol_num());
|
||||
}
|
||||
//获取当前纸管的高度
|
||||
// 解析描述数组
|
||||
String[] tubeArray = material_name.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
|
||||
int currLength = Integer.parseInt(tubeArray[tubeArray.length - 1]);
|
||||
|
||||
//校验高度差要大于50MM,否则不允许进行绑定
|
||||
int num = Integer.parseInt(row_num);
|
||||
if (num == 1) {
|
||||
//只判断第二排的纸管长度
|
||||
int nextNum = num + 1;
|
||||
MdPbPapervehicle nextPaper = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>().eq(MdPbPapervehicle::getVehicle_code, vehicle_code)
|
||||
.eq(MdPbPapervehicle::getRow_num, nextNum));
|
||||
if (ObjectUtil.isNotEmpty(nextPaper)) {
|
||||
//获取第二排的纸管高度和纸管类型
|
||||
String nextMaterialName = nextPaper.getMaterial_name();
|
||||
String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]);
|
||||
if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) {
|
||||
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//判断后一排的纸管高度
|
||||
int nextNum = num + 1;
|
||||
MdPbPapervehicle nextPaper = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>().eq(MdPbPapervehicle::getVehicle_code, vehicle_code)
|
||||
.eq(MdPbPapervehicle::getRow_num, nextNum));
|
||||
if (ObjectUtil.isNotEmpty(nextPaper)) {
|
||||
//获取后一排的纸管高度和纸管类型
|
||||
String nextMaterialName = nextPaper.getMaterial_name();
|
||||
String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]);
|
||||
if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) {
|
||||
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM!");
|
||||
}
|
||||
}
|
||||
//判断前一排的纸管高度
|
||||
int preNum = num - 1;
|
||||
MdPbPapervehicle prePaper = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>().eq(MdPbPapervehicle::getVehicle_code, vehicle_code)
|
||||
.eq(MdPbPapervehicle::getRow_num, preNum));
|
||||
if (ObjectUtil.isNotEmpty(prePaper)) {
|
||||
//获取后一排的纸管高度和纸管类型
|
||||
String preMaterialName = prePaper.getMaterial_name();
|
||||
String[] preArray = preMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
int preLength = Integer.parseInt(preArray[preArray.length - 1]);
|
||||
if (Math.abs(preLength - currLength) <= 50 && !material_code.equals(prePaper.getMaterial_code())) {
|
||||
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM!");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(papervehicle)) {
|
||||
papervehicle.setQty(1);
|
||||
papervehicle.setUpdate_optid(currentUserId);
|
||||
papervehicle.setUpdate_optname(nickName);
|
||||
papervehicle.setUpdate_time(now);
|
||||
papervehicleService.updateById(papervehicle);
|
||||
} else {
|
||||
papervehicle = new MdPbPapervehicle();
|
||||
papervehicle.setIvt_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
papervehicle.setVehicle_code(vehicle_code);
|
||||
papervehicle.setRow_num(row_num);
|
||||
papervehicle.setMaterial_code(material_code);
|
||||
papervehicle.setMaterial_name(material_name);
|
||||
papervehicle.setQty(1);
|
||||
papervehicle.setUpdate_optid(currentUserId);
|
||||
papervehicle.setUpdate_optname(nickName);
|
||||
papervehicle.setUpdate_time(now);
|
||||
papervehicleService.save(papervehicle);
|
||||
}
|
||||
}else if (type.equals("2")) {
|
||||
//清除管芯托盘库存
|
||||
papervehicleService.remove(new LambdaQueryWrapper<MdPbPapervehicle>().eq(MdPbPapervehicle::getVehicle_code, vehicle_code)
|
||||
.eq(MdPbPapervehicle::getRow_num, row_num)
|
||||
.eq(MdPbPapervehicle::getCol_num, col_num));
|
||||
}
|
||||
|
||||
//判断绑定的纸管是否在机械手范围内,如果存在的话把最新库存推送给电气
|
||||
BstIvtStockingivt bstIvtStockingivt = bstIvtStockingivtMapper.selectOne(new LambdaQueryWrapper<BstIvtStockingivt>().eq(BstIvtStockingivt::getVehicle_code, vehicle_code));
|
||||
if (bstIvtStockingivt != null && bstIvtStockingivt.getPoint_type().equals("1")) {
|
||||
List<MdPbPapervehicle> list = papervehicleService.list(new LambdaQueryWrapper<MdPbPapervehicle>().eq(MdPbPapervehicle::getVehicle_code, vehicle_code));
|
||||
JSONObject jo = new JSONObject();
|
||||
SlitterTaskUtil.doSavePaperInfos(list, jo);
|
||||
jo.put("product_area", bstIvtStockingivt.getProduct_area());
|
||||
jo.put("device_code", bstIvtStockingivt.getPoint_code());
|
||||
wmsToAcsService.getTubeMsg(jo);
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", org.springframework.http.HttpStatus.OK.value());
|
||||
result.put("message", "操作成功!");
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 根据输入点位查询是否有未完成任务
|
||||
* @param point_code
|
||||
* @return
|
||||
*/
|
||||
public JSONObject isSingleTask(String point_code) {
|
||||
JSONObject task1 = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code1 = '" + point_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
JSONObject task2 = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code2 = '" + point_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
JSONObject task3 = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code3 = '" + point_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
JSONObject task4 = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code4 = '" + point_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
|
||||
if(ObjectUtil.isNotEmpty(task1)){
|
||||
return task1;
|
||||
}else if(ObjectUtil.isNotEmpty(task2)){
|
||||
return task2;
|
||||
}else if(ObjectUtil.isNotEmpty(task3)){
|
||||
return task3;
|
||||
}else if(ObjectUtil.isNotEmpty(task4)){
|
||||
return task4;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,9 @@
|
||||
rn = 1;
|
||||
</select>
|
||||
<select id="getAllCutPlan2" resultType="org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto">
|
||||
SELECT p.resource_name,
|
||||
SELECT
|
||||
p.workorder_id,
|
||||
p.resource_name,
|
||||
p.parent_container_name,
|
||||
p.split_group,
|
||||
p.up_or_down,
|
||||
@@ -216,6 +218,7 @@
|
||||
AND p.container_name LIKE '%虚拟-B%'
|
||||
AND '1' = ( SELECT c.is_used FROM st_ivt_cutpointivt c WHERE c.ext_code = p.resource_name )
|
||||
GROUP BY
|
||||
p.workorder_id,
|
||||
p.resource_name,
|
||||
p.parent_container_name,
|
||||
p.split_group,
|
||||
@@ -224,7 +227,7 @@
|
||||
p.manufacture_sort,
|
||||
p.qzz_size,
|
||||
p.qzz_generation
|
||||
order by p.qzz_size,
|
||||
order by
|
||||
p.manufacture_sort desc,
|
||||
p.start_time
|
||||
</select>
|
||||
|
||||
@@ -2,49 +2,41 @@ package org.nl.b_lms.sch.tasks.slitter;
|
||||
|
||||
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.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.IBstIvtCutpointivtService;
|
||||
import org.nl.b_lms.bst.ivt.shafttubeivt.service.IBstIvtShafttubeivtService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.IBstIvtStockingivtService;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.utils.TaskUtils;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: acs请求拔轴完毕的送铜箔子卷任务
|
||||
* @Author: zds
|
||||
* @Description: 管芯agv搬运任务
|
||||
* @Date: 2024/2/1
|
||||
*/
|
||||
@Deprecated
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SendCopperFoilSubRollTrussTask extends AbstractAcsTask {
|
||||
private final String THIS_CLASS = SendCopperFoilSubRollTrussTask.class.getName();
|
||||
public class InstorStockAgvTask extends AbstractAcsTask {
|
||||
private final String THIS_CLASS = InstorStockAgvTask.class.getName();
|
||||
|
||||
@Autowired
|
||||
private IschBaseTaskService taskService;
|
||||
@Autowired
|
||||
private IPdmBiSlittingproductionplanService slittingproductionplanService;
|
||||
@Autowired
|
||||
private IBstIvtCutpointivtService bcutpointivtService;
|
||||
@Autowired
|
||||
private IBstIvtShafttubeivtService shafttubeivtService;
|
||||
|
||||
private IBstIvtStockingivtService stockingivtService;
|
||||
@Override
|
||||
public List<AcsTaskDto> addTask() {
|
||||
/*
|
||||
@@ -61,12 +53,11 @@ public class SendCopperFoilSubRollTrussTask extends AbstractAcsTask {
|
||||
.task_type(task.getAcs_task_type())
|
||||
.start_device_code(task.getPoint_code1())
|
||||
.next_device_code(task.getPoint_code2())
|
||||
.start_device_code2(task.getPoint_code3())
|
||||
.next_device_code2(task.getPoint_code4())
|
||||
.start_device_code2("")
|
||||
.next_device_code2("")
|
||||
.vehicle_code(task.getVehicle_code())
|
||||
.agv_system_type(agv_system_type)
|
||||
.priority(task.getPriority())
|
||||
.remark(task.getRemark())
|
||||
.product_area(task.getProduct_area())
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
@@ -75,38 +66,60 @@ public class SendCopperFoilSubRollTrussTask extends AbstractAcsTask {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||
SchBaseTask task = taskService.getById(taskObj.getString("task_id"));
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
String task_status = task.getTask_status();
|
||||
if(task_status.equals(TaskStatusEnum.FINISHED.getCode())){
|
||||
throw new BadRequestException("任务已完成不允许操作!");
|
||||
}
|
||||
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||
// 更新任务状态为执行中
|
||||
task.setTask_status(TaskStatusEnum.EXECUTING.getCode());
|
||||
}
|
||||
if (StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||
String startPoint = task.getPoint_code1();
|
||||
String endPoint = task.getPoint_code2();
|
||||
BstIvtStockingivt startPointObj = stockingivtService.getPointByCode(startPoint, false);
|
||||
BstIvtStockingivt endPointObj = stockingivtService.getPointByCode(endPoint, false);
|
||||
// 互换资源 (交换载具号)
|
||||
endPointObj.setIvt_status("1");
|
||||
endPointObj.setVehicle_code(task.getVehicle_code());
|
||||
TaskUtils.updateOptMessageByBStockingPoint(endPointObj);
|
||||
stockingivtService.update(endPointObj);
|
||||
startPointObj.setVehicle_code("");
|
||||
startPointObj.setIvt_status("0");
|
||||
TaskUtils.updateOptMessageByBStockingPoint(startPointObj);
|
||||
stockingivtService.update(startPointObj);
|
||||
}
|
||||
// 取消
|
||||
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||
if(task_status.equals(TaskStatusEnum.PICK_UP_COMPLETED.getCode())){
|
||||
throw new BadRequestException("取货完成不允许取消!");
|
||||
}
|
||||
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||
}
|
||||
TaskUtils.updateOptMessageByTask(task);
|
||||
task.setUpdate_time(DateUtil.now());
|
||||
task.setUpdate_optid(currentUserId);
|
||||
task.setUpdate_optname(currentUsername);
|
||||
taskService.updateById(task);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createTask(JSONObject form) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
task.setTask_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
task.setTask_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||
task.setPoint_code1(form.getString("point_code1"));
|
||||
task.setPoint_code2(form.getString("point_code2"));
|
||||
task.setMaterial_code(form.getString("material_code"));
|
||||
task.setAcs_task_type("6");
|
||||
task.setVehicle_code(form.getString("vehicle_code"));
|
||||
task.setAcs_task_type("3");
|
||||
task.setIs_delete("0");
|
||||
task.setRequest_param(form.toJSONString());
|
||||
task.setTask_type(form.getString("task_type"));
|
||||
@@ -115,15 +128,9 @@ public class SendCopperFoilSubRollTrussTask extends AbstractAcsTask {
|
||||
task.setCreate_name(currentUsername);
|
||||
task.setCreate_time(DateUtil.now());
|
||||
task.setHandle_class(THIS_CLASS);
|
||||
//根据类型获取对应的任务优先级
|
||||
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", task.getTask_type()).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(priority_jo)) {
|
||||
task.setPriority("1");
|
||||
} else {
|
||||
task.setPriority(priority_jo.getString("value"));
|
||||
}
|
||||
task.setPriority("1");
|
||||
taskService.save(task);
|
||||
// this.immediateNotifyAcs(null);
|
||||
this.immediateNotifyAcs(null);
|
||||
return task.getTask_id();
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
package org.nl.b_lms.sch.tasks.slitter;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 分切缓存位送子卷业务(废弃)
|
||||
* @Date: 2024/2/1
|
||||
*/
|
||||
@Deprecated
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SendShaftCacheAgvTask extends AbstractAcsTask {
|
||||
|
||||
@Override
|
||||
public List<AcsTaskDto> addTask() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createTask(JSONObject form) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceFinish(String task_id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_id) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -121,23 +121,78 @@ public class TrussCallAirShaftTask extends AbstractAcsTask {
|
||||
// 取消
|
||||
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||
|
||||
//获取穿拔轴点
|
||||
String endPoint = task.getPoint_code2();
|
||||
BstIvtShafttubeivt endPointObj = shafttubeivtService.getOne(new LambdaQueryWrapper<BstIvtShafttubeivt>()
|
||||
.eq(BstIvtShafttubeivt::getPoint_code, endPoint));
|
||||
|
||||
// 将分切计划is_paper_ok --- 2 -> 1
|
||||
String requestParam = task.getRequest_param();
|
||||
JSONObject jsonObject = JSONObject.parseObject(requestParam);
|
||||
if (ObjectUtil.isEmpty(requestParam)) {
|
||||
throw new BadRequestException("任务 code = " + task.getTask_code() + " 参数错误");
|
||||
}
|
||||
JSONObject needPlan = jsonObject.getJSONObject("needPlan");
|
||||
if (ObjectUtil.isNotEmpty(needPlan)) {
|
||||
// 回退
|
||||
LambdaUpdateWrapper<PdmBiSlittingproductionplan> updateWrapper = new LambdaUpdateWrapper<PdmBiSlittingproductionplan>();
|
||||
updateWrapper.set(PdmBiSlittingproductionplan::getIs_paper_ok, "1")
|
||||
.eq(PdmBiSlittingproductionplan::getParent_container_name, needPlan.getString("parent_container_name"))
|
||||
.eq(PdmBiSlittingproductionplan::getResource_name, needPlan.getString("resource_name"))
|
||||
.eq(PdmBiSlittingproductionplan::getSplit_group, needPlan.getString("split_group"))
|
||||
.eq(PdmBiSlittingproductionplan::getUp_or_down, needPlan.getString("up_or_down"))
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO);
|
||||
slittingproductionplanService.update(updateWrapper);
|
||||
//是否有接续的套轴计划
|
||||
Integer casingCount = jsonObject.getInteger("casingCount");
|
||||
|
||||
//若有接续套轴则取消套轴计划
|
||||
if(casingCount.intValue() > 0){
|
||||
JSONObject needPlan = jsonObject.getJSONObject("needPlan");
|
||||
if (ObjectUtil.isNotEmpty(needPlan)) {
|
||||
// 回退最多同一根轴的两个计划
|
||||
LambdaUpdateWrapper<PdmBiSlittingproductionplan> updateWrapper = new LambdaUpdateWrapper<PdmBiSlittingproductionplan>();
|
||||
updateWrapper.set(PdmBiSlittingproductionplan::getIs_paper_ok, "1")
|
||||
.eq(PdmBiSlittingproductionplan::getParent_container_name, needPlan.getString("parent_container_name"))
|
||||
.eq(PdmBiSlittingproductionplan::getResource_name, needPlan.getString("resource_name"))
|
||||
.eq(PdmBiSlittingproductionplan::getSplit_group, needPlan.getString("split_group"))
|
||||
.eq(PdmBiSlittingproductionplan::getUp_or_down, needPlan.getString("up_or_down"))
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO);
|
||||
slittingproductionplanService.update(updateWrapper);
|
||||
}
|
||||
} else{//若无接续则取消预分配的气胀轴空位
|
||||
//尺寸
|
||||
String qzzSize = jsonObject.getString("qzz_size");
|
||||
//代数
|
||||
String qzzGeneration = jsonObject.getString("qzz_generation");
|
||||
//区域
|
||||
String location = endPointObj.getPoint_location();
|
||||
//若点位是短区,且计划需要4短;若点位是长区,且计划需要5长
|
||||
if ((StrUtil.equals(qzzGeneration, "4") && StrUtil.equals(location, "0")) || (StrUtil.equals(qzzGeneration, "5") && StrUtil.equals(location, "1")))
|
||||
{
|
||||
// 查询拔轴设备旁边缓存架点位是否存在
|
||||
List<BstIvtShafttubeivt> shafttubeivts = shafttubeivtService.getByQzzSize(qzzSize ,endPointObj.getPoint_code(), location);
|
||||
// 对应尺寸的气涨轴库
|
||||
BstIvtShafttubeivt shafttubeivt = shafttubeivts.get(0);
|
||||
//若预分配的是缓存架,则取消缓存架
|
||||
if(StrUtil.equals(shafttubeivt.getPlan(), "1")){
|
||||
shafttubeivt.setPlan("");
|
||||
shafttubeivt.setUpdate_time(DateUtil.now());
|
||||
shafttubeivtService.updateById(shafttubeivt);
|
||||
log.info("预分配缓存架空位被取消 - {}", shafttubeivt);
|
||||
}else{
|
||||
List<BstIvtShafttubeivt> qzzCache = shafttubeivtService.getNotTaskShaftCacheEmpty3(qzzSize,qzzGeneration);
|
||||
if (qzzCache.size() > 0) {
|
||||
// 预扣除暂存架库存
|
||||
BstIvtShafttubeivt waitUsedPoint = qzzCache.get(0);
|
||||
waitUsedPoint.setPlan("");
|
||||
waitUsedPoint.setUpdate_time(DateUtil.now());
|
||||
shafttubeivtService.updateById(waitUsedPoint);
|
||||
log.info("预分配暂存架空位被取消 - {}", waitUsedPoint);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// 根据尺寸和代数,查询气涨轴暂存架是否有库存
|
||||
List<BstIvtShafttubeivt> qzzCache = shafttubeivtService.getNotTaskShaftCacheEmpty3(qzzSize,qzzGeneration);
|
||||
if (qzzCache.size() > 0) {
|
||||
// 预扣除暂存架库存
|
||||
BstIvtShafttubeivt waitUsedPoint = qzzCache.get(0);
|
||||
waitUsedPoint.setPlan("");
|
||||
waitUsedPoint.setUpdate_time(DateUtil.now());
|
||||
shafttubeivtService.updateById(waitUsedPoint);
|
||||
log.info("预分配暂存架空位被取消 - {}", waitUsedPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
task.setUpdate_time(DateUtil.now());
|
||||
|
||||
@@ -94,6 +94,7 @@ public class TrussCallShaftCacheTask extends AbstractAcsTask {
|
||||
|
||||
|
||||
endPointObj.setHave_qzz("1");
|
||||
endPointObj.setPlan("");
|
||||
TaskUtils.updateOptMessageByBShaftPoint(endPointObj);
|
||||
shafttubeivtService.updateById(endPointObj);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ public class TrussSendAirShaftTask extends AbstractAcsTask {
|
||||
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||
String startPoint = task.getPoint_code1();
|
||||
String endPoint = task.getPoint_code2();
|
||||
//拔轴设备点位
|
||||
BstIvtShafttubeivt startPointObj = shafttubeivtService.getByPointCode(startPoint, false);
|
||||
BstIvtCutpointivt endPointObj = bcutpointivtService.getPintByTrussCode(endPoint, false);
|
||||
// 设置点位信息
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,8 @@ public enum SlitterEnum {
|
||||
TASK_TYPE(MapOf.of("穿拔轴缓存<>穿拔轴位", "010801", "穿拔轴缓存<>分切对接位", "010802", "穿拔轴位<>气胀轴缓存位", "010803"
|
||||
, "分切机下料AGV任务", "010804", "分切机上气胀轴", "010805", "分切机下气胀轴", "010806", "备货区送载具", "010807"
|
||||
, "备货区送纸管", "010808", "分切机下料桁架任务", "010809", "分切机下料AGV到内包间", "010810", "套轴异常处理AGV任务", "010811"
|
||||
, "套轴异常处理桁架任务", "010812", "送气胀轴到分切机任务", "010813", "拔轴完毕出轴", "010814", "穿拔轴缓存<>气胀轴缓存位", "010815"));
|
||||
, "套轴异常处理桁架任务", "010812", "送气胀轴到分切机任务", "010813", "拔轴完毕出轴", "010814", "穿拔轴缓存<>气胀轴缓存位", "010815",
|
||||
"托盘入管芯库任务", "010816","管芯备货任务", "010817"));
|
||||
private Map<String, String> code;
|
||||
|
||||
public String code(String desc) {
|
||||
|
||||
@@ -9,6 +9,10 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class SlitterPlanDistinctDto {
|
||||
/**
|
||||
* 分切计划标识
|
||||
*/
|
||||
private String workorder_id;
|
||||
/**
|
||||
* 分切设备
|
||||
*/
|
||||
|
||||
@@ -2054,23 +2054,27 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public JSONObject acsRequestPoint(JSONObject param) {
|
||||
log.info("acsRequestPoint输入参数为--------------------------:" + param.toString());
|
||||
JSONObject result = new JSONObject();
|
||||
// task_code、type
|
||||
// 1正常二次取货 2正常二次放货 3退轴二次放货
|
||||
String type = param.getString("type");
|
||||
String taskCode = param.getString("task_code");
|
||||
SchBaseTask task = taskService.getOne(new LambdaQueryWrapper<SchBaseTask>()
|
||||
.eq(SchBaseTask::getTask_code, taskCode)
|
||||
.lt(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
||||
.eq(SchBaseTask::getIs_delete, "0"));
|
||||
if (ObjectUtil.isEmpty(task)) {
|
||||
throw new BadRequestException("任务号【" + taskCode + "】对应的任务找不到!");
|
||||
}
|
||||
String targetPoint = "";
|
||||
boolean updateFlag = false;
|
||||
//二次取货
|
||||
if ("1".equals(type)) {
|
||||
if (task.getPoint_code1().contains("QHD")) {
|
||||
// 请求取货
|
||||
// 拔轴设备点位
|
||||
String deviceCode = task.getPoint_code2();
|
||||
BstIvtShafttubeivt startPoint = shafttubeivtService.getByPointCode(deviceCode, false);
|
||||
|
||||
JSONObject requestParam = JSONObject.parseObject(task.getRequest_param());
|
||||
//获取气胀轴尺寸
|
||||
String qzzSize = requestParam.getString("qzz_size");
|
||||
// 获取气涨轴缓存没有任务的点位
|
||||
List<BstIvtShafttubeivt> shafttubeivts = shafttubeivtService.getNotTaskShaftCache(qzzSize,
|
||||
@@ -2089,6 +2093,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
targetPoint = task.getPoint_code1();
|
||||
}
|
||||
}
|
||||
//二次放货
|
||||
if ("2".equals(type)) {
|
||||
if (task.getPoint_code2().contains("FHD")) {
|
||||
// 请求放货
|
||||
@@ -2115,6 +2120,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
targetPoint = task.getPoint_code2();
|
||||
}
|
||||
}
|
||||
//退轴二次放货
|
||||
if ("3".equals(type)) {
|
||||
if (task.getPoint_code2().contains("FHD")) {
|
||||
// 请求放货
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.pda.mps.rest;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -30,7 +31,7 @@ public class PaperTubeController {
|
||||
|
||||
@PostMapping("/queryPaperMaterial")
|
||||
@Log("查询纸管物料")
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryPaperMaterial(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(paperTubeService.queryPaperMaterial(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.pda.mps.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -142,6 +143,7 @@ public class PaperTubeServiceImpl implements PaperTubeService {
|
||||
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("rows", rows);
|
||||
result.put("status", HttpStatus.HTTP_OK);
|
||||
result.put("message", "查询成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,13 @@ public interface PrintService {
|
||||
*/
|
||||
JSONObject customerPrintBY2(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 管芯打印
|
||||
* @param whereJson
|
||||
* @return
|
||||
*/
|
||||
public JSONObject gx_print(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 获取单据类型
|
||||
*
|
||||
|
||||
@@ -461,6 +461,57 @@ public class PrintServiceImpl implements PrintService {
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject gx_print(JSONObject whereJson) {
|
||||
JSONObject jo = new JSONObject();
|
||||
String paper_code = jo.getString("paper_code");
|
||||
String material_code = jo.getString("material_code");
|
||||
String material_name = jo.getString("material_name");
|
||||
String standard_weight = jo.getString("standard_weight");
|
||||
|
||||
|
||||
WQLObject printTab = WQLObject.getWQLObject("pdm_bi_printinfo");
|
||||
// 生成txt文件
|
||||
JSONObject jsonPrint = printTab.query("print_id = '" + whereJson.getString("print_type") + "'").uniqueResult(0);
|
||||
//10.1.3.21/LMSPrinter/
|
||||
String time = String.valueOf(DateUtil.current());
|
||||
String filePath = jsonPrint.getString("print_route") +time+"外包标签.txt";
|
||||
FileWriter fw = null;
|
||||
try {
|
||||
File file = new File(filePath);
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
fw = new FileWriter(filePath);
|
||||
OutputStreamWriter write = new OutputStreamWriter(new FileOutputStream(file), "utf-8");
|
||||
BufferedWriter bw = new BufferedWriter(write);
|
||||
bw.write("paper_code,material_code,material_name,standard_weight\n");
|
||||
|
||||
bw.write(paper_code + ","
|
||||
+ material_code + ","
|
||||
+ material_name + ","
|
||||
+ standard_weight + "KG"+ "\n"
|
||||
);
|
||||
|
||||
bw.close();
|
||||
jo.put("message", "打印成功!");
|
||||
log.info(DateUtil.now()+"打印成功!");
|
||||
} catch (Exception e) {
|
||||
jo.put("message", "打印失败!" + e.getMessage());
|
||||
log.info(DateUtil.now()+"1打印失败!");
|
||||
} finally {
|
||||
try {
|
||||
if(fw != null){
|
||||
fw.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
jo.put("message", "打印失败!" + e.getMessage());
|
||||
log.info(DateUtil.now()+"2打印失败!");
|
||||
}
|
||||
}
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject printType(JSONObject whereJson) {
|
||||
JSONArray rows = WQL.getWO("PDA_ST_01").addParam("flag", "6").process().getResultJSONArray(0);
|
||||
|
||||
Reference in New Issue
Block a user