rev:wql替换
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
package org.nl.wms.pdm.rest;
|
||||
|
||||
package org.nl.b_lms.pdm.bi.slittingproductionplan.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.pdm.service.SlittingproductionplanService;
|
||||
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -17,10 +14,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @date 2022-10-09
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -28,16 +21,14 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class SlittingproductionplanController {
|
||||
|
||||
private final SlittingproductionplanService slittingproductionplanService;
|
||||
|
||||
private final IPdmBiSlittingproductionplanService biSlittingproductionplanService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询分切计划")
|
||||
|
||||
//@SaCheckPermission("@el.check('slittingproductionplan:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(slittingproductionplanService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(biSlittingproductionplanService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@@ -45,7 +36,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
//@SaCheckPermission("@el.check('slittingproductionplan:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBiSlittingproductionplan dto) {
|
||||
slittingproductionplanService.create(dto);
|
||||
biSlittingproductionplanService.create(dto);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@@ -54,7 +45,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
//@SaCheckPermission("@el.check('slittingproductionplan:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBiSlittingproductionplan dto) {
|
||||
slittingproductionplanService.update(dto);
|
||||
biSlittingproductionplanService.update(dto);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@@ -63,7 +54,7 @@ public class SlittingproductionplanController {
|
||||
//@SaCheckPermission("@el.check('slittingproductionplan:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
slittingproductionplanService.deleteAll(ids);
|
||||
biSlittingproductionplanService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -71,7 +62,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
@PostMapping("/upMaterFinish")
|
||||
public ResponseEntity<Object> upMaterFinish(@RequestBody JSONObject whereJson) {
|
||||
slittingproductionplanService.upMaterFinish(whereJson);
|
||||
biSlittingproductionplanService.upMaterFinish(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -79,7 +70,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
@PostMapping("/caseFinish")
|
||||
public ResponseEntity<Object> caseFinish(@RequestBody JSONObject whereJson) {
|
||||
slittingproductionplanService.caseFinish(whereJson);
|
||||
biSlittingproductionplanService.caseFinish(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -87,7 +78,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
@PostMapping("/sendFinish")
|
||||
public ResponseEntity<Object> sendFinish(@RequestBody JSONObject whereJson) {
|
||||
slittingproductionplanService.sendFinish(whereJson);
|
||||
biSlittingproductionplanService.sendFinish(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -95,7 +86,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
@PostMapping("/inFinish")
|
||||
public ResponseEntity<Object> inFinish(@RequestBody JSONObject whereJson) {
|
||||
slittingproductionplanService.inFinish(whereJson);
|
||||
biSlittingproductionplanService.inFinish(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -103,7 +94,7 @@ public class SlittingproductionplanController {
|
||||
|
||||
@PostMapping("/compelFinish")
|
||||
public ResponseEntity<Object> compelFinish(@RequestBody JSONObject whereJson) {
|
||||
slittingproductionplanService.compelFinish(whereJson);
|
||||
biSlittingproductionplanService.compelFinish(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@Log("修改子卷放置方向")
|
||||
@@ -24,7 +24,7 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<PdmBiSlittingproductionplan>
|
||||
*/
|
||||
IPage<PdmBiSlittingproductionplan> queryAll(Map whereJson, PageQuery pageable);
|
||||
Map<String, Object> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
@@ -42,7 +42,7 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取可用的分切计划
|
||||
@@ -152,4 +152,39 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
||||
* @return
|
||||
*/
|
||||
List<PdmBiSlittingproductionplan> getXnPlanByDevice(String deviceCode);
|
||||
|
||||
/**
|
||||
* 上料完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void upMaterFinish(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 套管完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void caseFinish(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 配送完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void sendFinish(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 入站完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void inFinish(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 强制完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void compelFinish(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -65,7 +66,8 @@ public class PdmBiSlittingproductionplan implements Serializable {
|
||||
private String manufacture_date;
|
||||
|
||||
/** 管件类型 */
|
||||
private String paper_tube_or_FRP;
|
||||
@TableField("paper_tube_or_FRP")
|
||||
private String paper_tube_or_frp;
|
||||
|
||||
/** 纸筒物料编码 */
|
||||
private String paper_tube_material;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.mapper;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dto.PdmBiSlittingproductionplanDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto;
|
||||
|
||||
import java.util.List;
|
||||
@@ -21,4 +25,6 @@ public interface PdmBiSlittingproductionplanMapper extends BaseMapper<PdmBiSlitt
|
||||
List<SlitterPlanDistinctDto> getAllHalfPlanRestruct(List<String> qzzs);
|
||||
|
||||
List<SlitterPlanDistinctDto> getAllCutPlan2(Integer day);
|
||||
|
||||
IPage<PdmBiSlittingproductionplanDto> selectAllPage(@Param("dto") PdmBiSlittingproductionplanDto dto, @Param("page") IPage<PdmBiSlittingproductionplanDto> page);
|
||||
}
|
||||
|
||||
@@ -231,4 +231,68 @@
|
||||
p.manufacture_sort desc,
|
||||
p.start_time
|
||||
</select>
|
||||
<select id="selectAllPage"
|
||||
resultType="org.nl.b_lms.pdm.bi.slittingproductionplan.service.dto.PdmBiSlittingproductionplanDto">
|
||||
SELECT
|
||||
plan.*,
|
||||
ivt.product_area,
|
||||
ivt.point_code,
|
||||
'0' AS show_edit
|
||||
FROM
|
||||
PDM_BI_SlittingProductionPlan plan
|
||||
LEFT JOIN ST_IVT_CutPointIvt ivt ON ivt.ext_code = plan.resource_name
|
||||
WHERE
|
||||
plan.is_delete = '0'
|
||||
<if test="dto.order_type != null and dto.order_type != ''">
|
||||
AND plan.order_type = #{dto.order_type}
|
||||
</if>
|
||||
|
||||
<if test="dto.product_area != null and dto.product_area != ''">
|
||||
AND ivt.product_area = #{dto.product_area}
|
||||
</if>
|
||||
|
||||
<if test="dto.status != null and dto.status != ''">
|
||||
AND plan.status = #{dto.status}
|
||||
</if>
|
||||
|
||||
<if test="dto.resource_name != null and dto.resource_name != ''">
|
||||
AND plan.resource_name LIKE CONCAT('%', #{dto.resource_name}, '%')
|
||||
</if>
|
||||
|
||||
<if test="dto.parent_container_name != null and dto.parent_container_name!= ''">
|
||||
AND plan.parent_container_name LIKE CONCAT('%', #{dto.parent_container_name}, '%')
|
||||
</if>
|
||||
|
||||
<if test="dto.container_name != null and dto.container_name != ''">
|
||||
AND plan.container_name LIKE CONCAT('%', #{dto.container_name}, '%')
|
||||
</if>
|
||||
|
||||
<if test="dto.qzzno != null and dto.qzzno != ''">
|
||||
AND plan.qzzno LIKE CONCAT('%', #{dto.qzzno}, '%')
|
||||
</if>
|
||||
|
||||
<if test="dto.is_parent_ok != null and dto.is_parent_ok != ''">
|
||||
AND plan.is_parent_ok = #{dto.is_parent_ok}
|
||||
</if>
|
||||
|
||||
<if test="dto.is_child_tz_ok != null and dto.is_child_tz_ok != ''">
|
||||
AND plan.is_child_tz_ok = #{dto.is_child_tz_ok}
|
||||
</if>
|
||||
|
||||
<if test="dto.is_child_ps_ok != null and dto.is_child_ps_ok != ''">
|
||||
AND plan.is_child_ps_ok = #{dto.is_child_ps_ok}
|
||||
</if>
|
||||
|
||||
<if test="dto.is_call != null and dto.is_call != ''">
|
||||
AND plan.is_call = #{dto.is_call}
|
||||
</if>
|
||||
|
||||
<if test="dto.begin_time != null and dto.begin_time != ''">
|
||||
AND plan.manufacture_date <![CDATA[ >= ]]> #{dto.begin_time}
|
||||
</if>
|
||||
|
||||
<if test="dto.end_time != null and dto.end_time != ''">
|
||||
AND plan.manufacture_date <![CDATA[ <= ]]> #{dto.end_time}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -5,7 +5,10 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import lombok.Builder;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
@@ -13,8 +16,7 @@ import java.io.Serializable;
|
||||
* @date 2024-02-26
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class PdmBiSlittingproductionplanDto implements Serializable {
|
||||
public class PdmBiSlittingproductionplanDto extends PdmBiSlittingproductionplan implements Serializable {
|
||||
|
||||
/** 分切计划标识 */
|
||||
/** 防止精度丢失 */
|
||||
@@ -100,7 +102,7 @@ public class PdmBiSlittingproductionplanDto implements Serializable {
|
||||
private String status;
|
||||
|
||||
/** 修改人 */
|
||||
private Long update_optid;
|
||||
private String update_optid;
|
||||
|
||||
/** 修改人姓名 */
|
||||
private String update_optname;
|
||||
@@ -109,10 +111,10 @@ public class PdmBiSlittingproductionplanDto implements Serializable {
|
||||
private String update_time;
|
||||
|
||||
/** 部门ID */
|
||||
private Long sysdeptid;
|
||||
private String sysdeptid;
|
||||
|
||||
/** 公司ID */
|
||||
private Long syscompanyid;
|
||||
private String syscompanyid;
|
||||
|
||||
/** 是否删除 */
|
||||
private String is_delete;
|
||||
@@ -146,4 +148,17 @@ public class PdmBiSlittingproductionplanDto implements Serializable {
|
||||
|
||||
/** 左右(1,2) */
|
||||
private String left_or_right;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String begin_time;
|
||||
|
||||
private String product_area;
|
||||
|
||||
|
||||
/**
|
||||
* 人员对应的区域
|
||||
*/
|
||||
private List<String> in_area_id;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package org.nl.b_lms.pdm.bi.slittingproductionplan.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
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 com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -14,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.mapper.PdmBiSlittingproductionplanMapper;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dto.PdmBiSlittingproductionplanDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
@@ -21,17 +24,22 @@ import org.nl.common.domain.query.PageQuery;
|
||||
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.wms.basedata.st.service.impl.UserAreaServiceImpl;
|
||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author lyd
|
||||
* @description 服务实现
|
||||
* @date 2024-02-26
|
||||
**/
|
||||
@Slf4j
|
||||
@@ -41,25 +49,59 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
@Autowired
|
||||
private PdmBiSlittingproductionplanMapper pdmBiSlittingproductionplanMapper;
|
||||
|
||||
@Autowired
|
||||
private LmsToMesService lmsToMesService;
|
||||
|
||||
@Override
|
||||
public IPage<PdmBiSlittingproductionplan> queryAll(Map whereJson, PageQuery page){
|
||||
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new LambdaQueryWrapper<>();
|
||||
IPage<PdmBiSlittingproductionplan> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
pdmBiSlittingproductionplanMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
public Map<String, Object> queryAll(Map whereJson, PageQuery page) {
|
||||
PdmBiSlittingproductionplanDto dto = new PdmBiSlittingproductionplanDto();
|
||||
|
||||
dto.setOrder_type(MapUtil.getStr(whereJson, "order_type"));
|
||||
dto.setStatus(MapUtil.getStr(whereJson, "status"));
|
||||
dto.setProduct_area(MapUtil.getStr(whereJson, "product_area"));
|
||||
dto.setContainer_name(MapUtil.getStr(whereJson, "container_name"));
|
||||
dto.setResource_name(MapUtil.getStr(whereJson, "resource_name"));
|
||||
dto.setBegin_time(MapUtil.getStr(whereJson, "begin_time"));
|
||||
dto.setEnd_time(MapUtil.getStr(whereJson, "end_time"));
|
||||
dto.setIs_parent_ok(MapUtil.getStr(whereJson, "is_parent_ok"));
|
||||
dto.setIs_child_tz_ok(MapUtil.getStr(whereJson, "is_child_tz_ok"));
|
||||
dto.setIs_child_ps_ok(MapUtil.getStr(whereJson, "is_child_ps_ok"));
|
||||
dto.setIs_call(MapUtil.getStr(whereJson, "is_call"));
|
||||
dto.setParent_container_name(MapUtil.getStr(whereJson, "parent_container_name"));
|
||||
dto.setQzzno(MapUtil.getStr(whereJson, "qzzno"));
|
||||
|
||||
IPage<PdmBiSlittingproductionplanDto> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
IPage<PdmBiSlittingproductionplanDto> pdmBiSlittingproductionplanDtoList = pdmBiSlittingproductionplanMapper.selectAllPage(dto, pages);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("totalElements", pdmBiSlittingproductionplanDtoList.getTotal());
|
||||
jsonObject.put("content", pdmBiSlittingproductionplanDtoList.getRecords());
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(PdmBiSlittingproductionplan entity) {
|
||||
public void create(PdmBiSlittingproductionplan dto) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
entity.setUpdate_optid(currentUserId);
|
||||
entity.setUpdate_optname(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
pdmBiSlittingproductionplanMapper.insert(entity);
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
|
||||
dto.setIs_call("0");
|
||||
dto.setStatus("01");
|
||||
dto.setIs_delete("0");
|
||||
dto.setIs_paper_ok("0");
|
||||
dto.setIs_child_tz_ok("0");
|
||||
dto.setIs_child_ps_ok("0");
|
||||
dto.setIs_parent_ok("0");
|
||||
if ("1".equals(dto.getOrder_type())) {
|
||||
dto.setMaterial_type("FG1");
|
||||
} else {
|
||||
dto.setMaterial_type("FG2");
|
||||
}
|
||||
pdmBiSlittingproductionplanMapper.insert(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,9 +120,19 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
pdmBiSlittingproductionplanMapper.deleteBatchIds(ids);
|
||||
public void deleteAll(Long[] ids) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
for (Long id : ids) {
|
||||
PdmBiSlittingproductionplan entity = new PdmBiSlittingproductionplan();
|
||||
entity.setWorkorder_id(id);
|
||||
entity.setIs_delete("1");
|
||||
entity.setUpdate_optid(currentUserId);
|
||||
entity.setUpdate_optname(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
pdmBiSlittingproductionplanMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,6 +157,7 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
.eq(PdmBiSlittingproductionplan::getStatus, status);
|
||||
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PdmBiSlittingproductionplan> getByQzzNos(List<String> qzzNo) {
|
||||
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new QueryWrapper<PdmBiSlittingproductionplan>().lambda();
|
||||
@@ -160,7 +213,7 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
public List<PdmBiSlittingproductionplan> getByContainerNames(List<String> collect) {
|
||||
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new QueryWrapper<PdmBiSlittingproductionplan>().lambda();
|
||||
lam.in(PdmBiSlittingproductionplan::getContainer_name, collect);
|
||||
lam.eq(PdmBiSlittingproductionplan::getIs_delete,"0");
|
||||
lam.eq(PdmBiSlittingproductionplan::getIs_delete, "0");
|
||||
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||
}
|
||||
|
||||
@@ -212,4 +265,154 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0");
|
||||
return this.list(lam);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void upMaterFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
|
||||
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
JSONObject mom_jo = new JSONObject();
|
||||
JSONObject json = data.getJSONObject(i);
|
||||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
||||
HashMap map = new HashMap<>();
|
||||
map.put("is_parent_ok", "1");
|
||||
map.put("update_optid", currentUserId);
|
||||
map.put("update_optname", currentUsername);
|
||||
map.put("update_time", DateUtil.now());
|
||||
if ("1".equals(jsonObject.getString("order_type"))) {
|
||||
tab.update(map, "parent_container_name = '" + json.getString("parent_container_name") + "'");
|
||||
mom_jo.put("contain_name", json.getString("contain_name"));
|
||||
mom_jo.put("warehouse", "1");
|
||||
} else {
|
||||
tab.update(map, "restruct_container_name = '" + json.getString("restruct_container_name") + "'");
|
||||
mom_jo.put("container_name", json.getString("contain_name"));
|
||||
mom_jo.put("package_box_sn", json.getString("package_box_sn"));
|
||||
mom_jo.put("warehouse", "3");
|
||||
}
|
||||
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssArrival'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
lmsToMesService.cutPlanMomRollDeliveryComplete(mom_jo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void caseFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String 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);
|
||||
|
||||
//调用MES接口,通知MES已经套轴完成
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("container_name", jsonObject.getString("container_name"));
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sendFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String 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.isEmpty(jsonObject.getString("qzzno"))) {
|
||||
throw new BadRequestException("还未绑定气涨轴!");
|
||||
}
|
||||
HashMap map = new HashMap();
|
||||
jsonObject.put("is_child_ps_ok", "1");
|
||||
jsonObject.put("status", "03");
|
||||
jsonObject.put("update_optid", currentUserId);
|
||||
jsonObject.put("update_optname", currentUsername);
|
||||
jsonObject.put("update_time", DateUtil.now());
|
||||
tab.update(jsonObject);
|
||||
|
||||
//调用MES接口,通知MES已经套轴完成
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("container_name", jsonObject.getString("container_name"));
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
lmsToMesService.airSwellWithPaperTubeAssArrival(jo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void inFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String 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.isEmpty(jsonObject.getString("qzzno"))) {
|
||||
throw new BadRequestException("还未绑定气涨轴!");
|
||||
}
|
||||
HashMap map = new HashMap();
|
||||
jsonObject.put("is_child_ps_ok", "1");
|
||||
jsonObject.put("status", "05");
|
||||
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");
|
||||
String 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"), "09")) {
|
||||
throw new BadRequestException("此单号:" + jsonObject.getString("mfg_order_name") + "已完成");
|
||||
}
|
||||
jsonObject.put("status", "09");
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ public class AutoCallAirShaftTask extends Prun {
|
||||
public Boolean toCallAgvMovePaperTube(List<PdmBiSlittingproductionplan> needPlans, String location, BstIvtShafttubeivt empty) {
|
||||
// 最多两根
|
||||
List<String> tubes = needPlans.stream().map(plan -> {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
return plan.getPaper_tube_material();
|
||||
} else {
|
||||
return plan.getFRP_material();
|
||||
@@ -826,7 +826,7 @@ public class AutoCallAirShaftTask extends Prun {
|
||||
for (PdmBiSlittingproductionplan plan : needPlans) {
|
||||
if (needPlans.size() == 1 || SlitterConstant.SLITTER_SUB_VOLUME_LEFT.equals(plan.getLeft_or_right())) {
|
||||
// 左卷
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
empty.setTube_code1(plan.getPaper_tube_material());
|
||||
empty.setTube_name1(plan.getPaper_tube_model());
|
||||
} else {
|
||||
@@ -836,7 +836,7 @@ public class AutoCallAirShaftTask extends Prun {
|
||||
empty.setContainer_name1(plan.getContainer_name());
|
||||
} else {
|
||||
// 右卷
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
empty.setTube_code2(plan.getPaper_tube_material());
|
||||
empty.setTube_name2(plan.getPaper_tube_model());
|
||||
} else {
|
||||
@@ -895,7 +895,7 @@ public class AutoCallAirShaftTask extends Prun {
|
||||
? shafttubeivt.getContainer_name1() : shafttubeivt.getContainer_name2();
|
||||
// 获取这个子卷号的分切计划
|
||||
PdmBiSlittingproductionplan byContainerName = slittingproductionplanService.getByContainerName(containerCode);
|
||||
String parent = SlitterConstant.SLITTER_TYPE_PAPER.equals(byContainerName.getPaper_tube_or_FRP())
|
||||
String parent = SlitterConstant.SLITTER_TYPE_PAPER.equals(byContainerName.getPaper_tube_or_frp())
|
||||
? byContainerName.getParent_container_name()
|
||||
: byContainerName.getRestruct_container_name();
|
||||
if (byContainerName.getResource_name().equals(dto.getResource_name())) {
|
||||
|
||||
@@ -2121,10 +2121,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
// 区分位置创建
|
||||
if (i == 0 && ObjectUtil.isNotEmpty(upLeftSizeK)) {
|
||||
// 上左
|
||||
plan.setPaper_tube_or_FRP(upLeftSizeV.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(upLeftSizeV.startsWith("48") ? "1" : "2");
|
||||
String[] split = upLeftSizeK.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(upLeftSizeV);
|
||||
plan.setPaper_tube_model(upLeftSizeK);
|
||||
plan.setPaper_tube_description(upLeftSizeK);
|
||||
@@ -2144,10 +2144,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
if (i == 1 && ObjectUtil.isNotEmpty(upRightSizeK)) {
|
||||
// 上右
|
||||
plan.setPaper_tube_or_FRP(upRightSizeV.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(upRightSizeV.startsWith("48") ? "1" : "2");
|
||||
String[] split = upRightSizeK.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(upRightSizeV);
|
||||
plan.setPaper_tube_model(upRightSizeK);
|
||||
plan.setPaper_tube_description(upRightSizeK);
|
||||
@@ -2167,10 +2167,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
if (i == 2 && ObjectUtil.isNotEmpty(downLeftSizeK)) {
|
||||
// 下左
|
||||
plan.setPaper_tube_or_FRP(downLeftSizeV.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(downLeftSizeV.startsWith("48") ? "1" : "2");
|
||||
String[] split = downLeftSizeK.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(downLeftSizeV);
|
||||
plan.setPaper_tube_model(downLeftSizeK);
|
||||
plan.setPaper_tube_description(downLeftSizeK);
|
||||
@@ -2190,10 +2190,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
if (i == 4 && ObjectUtil.isNotEmpty(downRightSizeK)) {
|
||||
// 下右
|
||||
plan.setPaper_tube_or_FRP(downRightSizeV.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(downRightSizeV.startsWith("48") ? "1" : "2");
|
||||
String[] split = downRightSizeK.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(downRightSizeV);
|
||||
plan.setPaper_tube_model(downRightSizeK);
|
||||
plan.setPaper_tube_description(downRightSizeK);
|
||||
@@ -2560,10 +2560,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
// 区分位置创建
|
||||
if (i == 0 && ObjectUtil.isNotEmpty(left_spec) && "1".equals(up_or_down)) {
|
||||
// 上左
|
||||
plan.setPaper_tube_or_FRP(left_spec_value.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(left_spec_value.startsWith("48") ? "1" : "2");
|
||||
String[] split = left_spec.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(left_spec_value);
|
||||
plan.setPaper_tube_model(left_spec);
|
||||
plan.setPaper_tube_description(left_spec);
|
||||
@@ -2582,10 +2582,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
if (i == 1 && ObjectUtil.isNotEmpty(right_spec) && "1".equals(up_or_down)) {
|
||||
// 上右
|
||||
plan.setPaper_tube_or_FRP(right_spec_value.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(right_spec_value.startsWith("48") ? "1" : "2");
|
||||
String[] split = right_spec.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(right_spec_value);
|
||||
plan.setPaper_tube_model(right_spec);
|
||||
plan.setPaper_tube_description(right_spec);
|
||||
@@ -2604,10 +2604,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
if (i == 0 && ObjectUtil.isNotEmpty(left_spec) && "2".equals(up_or_down)) {
|
||||
// 下左
|
||||
plan.setPaper_tube_or_FRP(left_spec_value.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(left_spec_value.startsWith("48") ? "1" : "2");
|
||||
String[] split = left_spec.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(left_spec_value);
|
||||
plan.setPaper_tube_model(left_spec);
|
||||
plan.setPaper_tube_description(left_spec);
|
||||
@@ -2626,10 +2626,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
if (i == 1 && ObjectUtil.isNotEmpty(right_spec) && "2".equals(up_or_down)) {
|
||||
// 下右
|
||||
plan.setPaper_tube_or_FRP(right_spec_value.startsWith("48") ? "1" : "2");
|
||||
plan.setPaper_tube_or_frp(right_spec_value.startsWith("48") ? "1" : "2");
|
||||
String[] split = right_spec.split("\\|");
|
||||
plan.setQzz_size(String.valueOf(split[2].charAt(0)));
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
if ("1".equals(plan.getPaper_tube_or_frp())) {
|
||||
plan.setPaper_tube_material(right_spec_value);
|
||||
plan.setPaper_tube_model(right_spec);
|
||||
plan.setPaper_tube_description(right_spec);
|
||||
|
||||
@@ -44,13 +44,13 @@ public class SlitterTaskUtil {
|
||||
public static String getPaperTubeInformation(PdmBiSlittingproductionplan plan) {
|
||||
// 纸管描述
|
||||
String tubeDescription;
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
tubeDescription = plan.getPaper_tube_description();
|
||||
} else {
|
||||
tubeDescription = plan.getFRP_description();
|
||||
}
|
||||
// 材质
|
||||
return getComposePaperTubeInformation(tubeDescription, plan.getPaper_tube_or_FRP());
|
||||
return getComposePaperTubeInformation(tubeDescription, plan.getPaper_tube_or_frp());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ public class SlitterTaskUtil {
|
||||
// 纸制筒管|纸管|6英寸|1300 or 纸制筒管|纸管|3英寸|12|650
|
||||
for (PdmBiSlittingproductionplan plan : needPlans) {
|
||||
if (SlitterConstant.SLITTER_SUB_VOLUME_LEFT.equals(plan.getLeft_or_right())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
param.put("left", plan.getPaper_tube_material());
|
||||
param.put("leftSize", plan.getPaper_tube_model().split("\\|")[2].charAt(0));
|
||||
} else {
|
||||
@@ -157,7 +157,7 @@ public class SlitterTaskUtil {
|
||||
}
|
||||
param.put("leftSpec", SlitterTaskUtil.getPaperTubeInformation(plan));
|
||||
} else {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
param.put("right", plan.getPaper_tube_material());
|
||||
param.put("rightSize", plan.getPaper_tube_model().split("\\|")[2].charAt(0));
|
||||
} else {
|
||||
@@ -177,7 +177,7 @@ public class SlitterTaskUtil {
|
||||
public static void putCurrentPaperSpec(JSONObject param, List<PdmBiSlittingproductionplan> oldPlans) {
|
||||
for (PdmBiSlittingproductionplan plan : oldPlans) {
|
||||
if (SlitterConstant.SLITTER_SUB_VOLUME_LEFT.equals(plan.getLeft_or_right())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
param.put("currentLeft", plan.getPaper_tube_material());
|
||||
param.put("currentLeftSize", plan.getPaper_tube_model().split("\\|")[2].charAt(0));
|
||||
} else {
|
||||
@@ -186,7 +186,7 @@ public class SlitterTaskUtil {
|
||||
}
|
||||
param.put("currentLeftSpec", SlitterTaskUtil.getPaperTubeInformation(plan));
|
||||
} else {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_frp())) {
|
||||
param.put("currentRight", plan.getPaper_tube_material());
|
||||
param.put("currentRightSize", plan.getPaper_tube_model().split("\\|")[2].charAt(0));
|
||||
} else {
|
||||
@@ -352,7 +352,7 @@ public class SlitterTaskUtil {
|
||||
public static String getPaperLength(PdmBiSlittingproductionplan plan) {
|
||||
// String s = "玻璃纤维及其制品|FRP管|6英寸|15|1700";
|
||||
String paperStr = "";
|
||||
if (plan.getPaper_tube_or_FRP().equals(SlitterConstant.SLITTER_TYPE_PAPER)) {
|
||||
if (plan.getPaper_tube_or_frp().equals(SlitterConstant.SLITTER_TYPE_PAPER)) {
|
||||
paperStr = plan.getPaper_tube_model();
|
||||
} else {
|
||||
paperStr = plan.getFRP_model();
|
||||
@@ -363,7 +363,7 @@ public class SlitterTaskUtil {
|
||||
public static String getPaperSize(PdmBiSlittingproductionplan plan) {
|
||||
// String s = "玻璃纤维及其制品|FRP管|6英寸|15|1700";
|
||||
String paperStr = "";
|
||||
if (plan.getPaper_tube_or_FRP().equals(SlitterConstant.SLITTER_TYPE_PAPER)) {
|
||||
if (plan.getPaper_tube_or_frp().equals(SlitterConstant.SLITTER_TYPE_PAPER)) {
|
||||
paperStr = plan.getPaper_tube_model();
|
||||
} else {
|
||||
paperStr = plan.getFRP_model();
|
||||
|
||||
@@ -2042,7 +2042,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
}
|
||||
resultParam.put("Weight", one.getWeight());
|
||||
resultParam.put("WeighDate", DateUtil.now());
|
||||
resultParam.put("Type", one.getPaper_tube_or_FRP());
|
||||
resultParam.put("Type", one.getPaper_tube_or_frp());
|
||||
resultParam.put("CarrierWeight", one.getPaper_weight());
|
||||
arr.add(resultParam);
|
||||
result.put("RTYPE", "S");
|
||||
|
||||
@@ -665,6 +665,11 @@ public class BakingServiceImpl implements BakingService {
|
||||
if (ObjectUtil.isEmpty(type)){
|
||||
throw new BadRequestException("请选择类型!");
|
||||
}
|
||||
JSONObject raw_jo = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").query("container_name ='" + container_name + "'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(raw_jo)) {
|
||||
throw new BadRequestException("未查询到对应的生箔工单!");
|
||||
}
|
||||
if (type.equals("1")) {
|
||||
//更新生箔工单的是否下发烘烤为是
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -875,7 +880,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
hotParam.put("oven_time", hours);
|
||||
this.createHotIoMst(hotParam);
|
||||
} else {
|
||||
throw new BadRequestException("请扫描正确的冷却区点位或对接点位!");
|
||||
throw new BadRequestException("请扫描正确的对接点位!");
|
||||
}
|
||||
} else if (StrUtil.equals(option, "1")) {
|
||||
// 入冷却
|
||||
|
||||
@@ -575,8 +575,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
}
|
||||
RawfoilWorkOrder rawfoilWorkOrder = rawfoilWorkOrderMapper.selectOne(new LambdaQueryWrapper<RawfoilWorkOrder>()
|
||||
.eq(ObjectUtil.isNotEmpty(raw_jo.getString("workorder_id")), RawfoilWorkOrder::getWorkorder_id, raw_jo.getString("workorder_id")));
|
||||
if (!StrUtil.equals(rawfoilWorkOrder.getStatus(), "02")) {
|
||||
throw new BadRequestException("工单状态不为空轴搬出");
|
||||
if (!StrUtil.equals(rawfoilWorkOrder.getStatus(), "10")) {
|
||||
throw new BadRequestException("工单状态不为配送中");
|
||||
}
|
||||
|
||||
//查询该母卷号对应的任务
|
||||
|
||||
@@ -8,9 +8,6 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.pdm.rawfoilworkorder.service.RawfoilWorkOrderService;
|
||||
import org.nl.wms.pdm.rawfoilworkorder.service.dao.RawfoilWorkOrder;
|
||||
import org.nl.wms.pdm.rawfoilworkorder.service.dto.RawfoilWorkOrderDto;
|
||||
import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@@ -4,9 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.rawfoilworkorder.service.dao.RawfoilWorkOrder;
|
||||
import org.nl.wms.pdm.rawfoilworkorder.service.dto.RawfoilWorkOrderDto;
|
||||
import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class RawfoilWorkOrder implements Serializable {
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@TableId(value = "point_id", type = IdType.NONE)
|
||||
@TableId(value = "workorder_id", type = IdType.NONE)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long workorder_id;
|
||||
|
||||
|
||||
@@ -100,11 +100,8 @@ public class RawfoilWorkOrderServiceImpl extends ServiceImpl<RawfoilWorkOrderMap
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(RawfoilWorkOrder dto) {
|
||||
String container_name = dto.getContainer_name();
|
||||
RawfoilWorkOrder rawfoilWorkOrder = rawfoilWorkOrderMapper.selectOne(new LambdaQueryWrapper<>(RawfoilWorkOrder.class)
|
||||
.eq(RawfoilWorkOrder::getContainer_name,container_name)
|
||||
.ne(RawfoilWorkOrder::getStatus,"40"));
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
|
||||
RawfoilWorkOrder rawfoilWorkOrder = rawfoilWorkOrderMapper.selectOne(new QueryWrapper<RawfoilWorkOrder>()
|
||||
.eq("container_name",container_name));
|
||||
if (ObjectUtil.isNotEmpty(rawfoilWorkOrder)) {
|
||||
throw new BadRequestException("母卷号已存在");
|
||||
}
|
||||
@@ -113,8 +110,8 @@ public class RawfoilWorkOrderServiceImpl extends ServiceImpl<RawfoilWorkOrderMap
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
StIvtSbpointivt stIvtSbpointivt = stIvtSbpointivtMapper.selectOne(new LambdaQueryWrapper<>(StIvtSbpointivt.class)
|
||||
.eq(StIvtSbpointivt::getExt_code,dto.getResource_name()));
|
||||
StIvtSbpointivt stIvtSbpointivt = stIvtSbpointivtMapper.selectOne(new QueryWrapper<StIvtSbpointivt>()
|
||||
.eq("ext_code",dto.getResource_name()));
|
||||
if (ObjectUtil.isEmpty(stIvtSbpointivt)) {
|
||||
throw new BadRequestException("点位设备不存在");
|
||||
}
|
||||
@@ -125,6 +122,7 @@ public class RawfoilWorkOrderServiceImpl extends ServiceImpl<RawfoilWorkOrderMap
|
||||
// if (ObjectUtil.isEmpty(materialbase)) {
|
||||
// throw new BadRequestException("物料不存在");
|
||||
// }
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(josnMater)) {
|
||||
throw new BadRequestException("物料不存在");
|
||||
@@ -138,6 +136,7 @@ public class RawfoilWorkOrderServiceImpl extends ServiceImpl<RawfoilWorkOrderMap
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
dto.setOrder_type("2");
|
||||
dto.setIs_delete("0");
|
||||
dto.setProduct_area(stIvtSbpointivt.getProduct_area());
|
||||
dto.setPoint_code(stIvtSbpointivt.getPoint_code());
|
||||
@@ -154,16 +153,14 @@ public class RawfoilWorkOrderServiceImpl extends ServiceImpl<RawfoilWorkOrderMap
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
String container_name = dto.getContainer_name();
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
int count = rawfoilWorkOrderMapper.selectCount(new LambdaQueryWrapper<>(RawfoilWorkOrder.class)
|
||||
.eq(RawfoilWorkOrder::getContainer_name,container_name)
|
||||
.ne(RawfoilWorkOrder::getStatus,"40"));
|
||||
if (count > 1) {
|
||||
RawfoilWorkOrder rawfoilWorkOrder = rawfoilWorkOrderMapper.selectOne(new QueryWrapper<RawfoilWorkOrder>()
|
||||
.eq("container_name",container_name));
|
||||
if (ObjectUtil.isNotEmpty(rawfoilWorkOrder)) {
|
||||
throw new BadRequestException("母卷号已存在");
|
||||
}
|
||||
|
||||
@@ -180,6 +177,7 @@ public class RawfoilWorkOrderServiceImpl extends ServiceImpl<RawfoilWorkOrderMap
|
||||
// if (ObjectUtil.isEmpty(materialbase)) {
|
||||
// throw new BadRequestException("物料不存在");
|
||||
// }
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(josnMater)) {
|
||||
throw new BadRequestException("物料不存在");
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
//package org.nl.wms.pdm.rest;
|
||||
//
|
||||
//
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import lombok.RequiredArgsConstructor;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.nl.modules.logging.annotation.Log;
|
||||
//import org.nl.wms.pdm.service.RawfoilworkorderService;
|
||||
//import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
||||
//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 liuxy
|
||||
// * @date 2022-10-08
|
||||
// **/
|
||||
//@RestController
|
||||
//@RequiredArgsConstructor
|
||||
//
|
||||
//@RequestMapping("/api/rawfoilworkorder")
|
||||
//@Slf4j
|
||||
//public class RawfoilworkorderController {
|
||||
//
|
||||
// private final RawfoilworkorderService rawfoilworkorderService;
|
||||
//
|
||||
// @GetMapping
|
||||
// @Log("查询生箔工序工单")
|
||||
//
|
||||
// //@SaCheckPermission("@el.check('rawfoilworkorder:list')")
|
||||
// public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
// return new ResponseEntity<>(rawfoilworkorderService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @PostMapping
|
||||
// @Log("新增生箔工序工单")
|
||||
//
|
||||
// //@SaCheckPermission("@el.check('rawfoilworkorder:add')")
|
||||
// public ResponseEntity<Object> create(@Validated @RequestBody RawfoilworkorderDto dto) {
|
||||
// rawfoilworkorderService.create(dto);
|
||||
// return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
// }
|
||||
//
|
||||
// @PutMapping
|
||||
// @Log("修改生箔工序工单")
|
||||
//
|
||||
// //@SaCheckPermission("@el.check('rawfoilworkorder:edit')")
|
||||
// public ResponseEntity<Object> update(@Validated @RequestBody RawfoilworkorderDto dto) {
|
||||
// rawfoilworkorderService.update(dto);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @Log("删除生箔工序工单")
|
||||
//
|
||||
// //@SaCheckPermission("@el.check('rawfoilworkorder:del')")
|
||||
// @DeleteMapping
|
||||
// public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
// rawfoilworkorderService.deleteAll(ids);
|
||||
// return new ResponseEntity<>(HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @Log("强制确认")
|
||||
//
|
||||
// @PostMapping("/compelEnd")
|
||||
// public ResponseEntity<Object> compelEnd(@RequestBody JSONObject whereJson) {
|
||||
// rawfoilworkorderService.compelEnd(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @Log("称重")
|
||||
//
|
||||
// @PostMapping("/confirm")
|
||||
// public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
// rawfoilworkorderService.confirm(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.OK);
|
||||
// }
|
||||
//}
|
||||
@@ -1,85 +0,0 @@
|
||||
//package org.nl.wms.pdm.service;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
||||
//import org.springframework.data.domain.Pageable;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @author liuxy
|
||||
// * @description 服务接口
|
||||
// * @date 2022-10-08
|
||||
// **/
|
||||
//public interface RawfoilworkorderService {
|
||||
//
|
||||
// /**
|
||||
// * 查询数据分页
|
||||
// *
|
||||
// * @param whereJson 条件
|
||||
// * @param page 分页参数
|
||||
// * @return Map<String, Object>
|
||||
// */
|
||||
// Map<String, Object> queryAll(Map whereJson, Pageable page);
|
||||
//
|
||||
// /**
|
||||
// * 查询所有数据不分页
|
||||
// *
|
||||
// * @param whereJson 条件参数
|
||||
// * @return List<RawfoilworkorderDto>
|
||||
// */
|
||||
// List<RawfoilworkorderDto> queryAll(Map whereJson);
|
||||
//
|
||||
// /**
|
||||
// * 根据ID查询
|
||||
// *
|
||||
// * @param workorder_id ID
|
||||
// * @return Rawfoilworkorder
|
||||
// */
|
||||
// RawfoilworkorderDto findById(Long workorder_id);
|
||||
//
|
||||
// /**
|
||||
// * 根据编码查询
|
||||
// *
|
||||
// * @param code code
|
||||
// * @return Rawfoilworkorder
|
||||
// */
|
||||
// RawfoilworkorderDto findByCode(String code);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 创建
|
||||
// *
|
||||
// * @param dto /
|
||||
// */
|
||||
// void create(RawfoilworkorderDto dto);
|
||||
//
|
||||
// /**
|
||||
// * 编辑
|
||||
// *
|
||||
// * @param dto /
|
||||
// */
|
||||
// void update(RawfoilworkorderDto dto);
|
||||
//
|
||||
// /**
|
||||
// * 多选删除
|
||||
// *
|
||||
// * @param ids /
|
||||
// */
|
||||
// void deleteAll(Long[] ids);
|
||||
//
|
||||
// /**
|
||||
// * 强制确认
|
||||
// *
|
||||
// * @param whereJson /
|
||||
// */
|
||||
// void compelEnd(JSONObject whereJson);
|
||||
//
|
||||
// /**
|
||||
// * 称重
|
||||
// *
|
||||
// * @param whereJson /
|
||||
// */
|
||||
// void confirm(JSONObject whereJson);
|
||||
//}
|
||||
@@ -1,107 +0,0 @@
|
||||
package org.nl.wms.pdm.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @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<PdmBiSlittingproductionplan> queryAll(Map whereJson);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*
|
||||
* @param workorder_id ID
|
||||
* @return Slittingproductionplan
|
||||
*/
|
||||
PdmBiSlittingproductionplan findById(Long workorder_id);
|
||||
|
||||
/**
|
||||
* 根据编码查询
|
||||
*
|
||||
* @param code code
|
||||
* @return Slittingproductionplan
|
||||
*/
|
||||
PdmBiSlittingproductionplan findByCode(String code);
|
||||
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void create(PdmBiSlittingproductionplan dto);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void update(PdmBiSlittingproductionplan 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 inFinish(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 强制完成
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void compelFinish(JSONObject whereJson);
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package org.nl.wms.pdm.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author geng by
|
||||
* @description /
|
||||
* @date 2022-06-02
|
||||
**/
|
||||
@Data
|
||||
public class BomDto implements Serializable {
|
||||
|
||||
/**
|
||||
* BOM单标识
|
||||
*/
|
||||
private String bom_uuid;
|
||||
|
||||
/**
|
||||
* BOM单编码
|
||||
*/
|
||||
private String bom_code;
|
||||
|
||||
/**
|
||||
* BOM单名称
|
||||
*/
|
||||
private String bom_name;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_uuid;
|
||||
|
||||
/**
|
||||
* 产品工艺路线标识
|
||||
*/
|
||||
private String processroute_uuid;
|
||||
|
||||
/**
|
||||
* 成材率百分比
|
||||
*/
|
||||
private BigDecimal yield_rate;
|
||||
|
||||
/**
|
||||
* 成品率百分比
|
||||
*/
|
||||
private BigDecimal endproduct_rate;
|
||||
|
||||
/**
|
||||
* BOM单状态
|
||||
*/
|
||||
private String bom_status;
|
||||
|
||||
/**
|
||||
* 明细数
|
||||
*/
|
||||
private BigDecimal detail_count;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package org.nl.wms.pdm.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;
|
||||
|
||||
/**
|
||||
* @author geng by
|
||||
* @description /
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
@Data
|
||||
public class DeviceDto implements Serializable {
|
||||
|
||||
/** 设备标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long device_id;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String device_code;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String device_name;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String device_model;
|
||||
|
||||
/**
|
||||
* 外部编码
|
||||
*/
|
||||
private String extend_code;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String is_active;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 设备产能
|
||||
*/
|
||||
private BigDecimal productivity;
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package org.nl.wms.pdm.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;
|
||||
|
||||
/**
|
||||
* @author geng by
|
||||
* @description /
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
@Data
|
||||
public class DeviceitemDto implements Serializable {
|
||||
|
||||
/** 项点标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long item_id;
|
||||
|
||||
/**
|
||||
* 项点编码
|
||||
*/
|
||||
private String item_code;
|
||||
|
||||
/**
|
||||
* 项点名称
|
||||
*/
|
||||
private String item_name;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
private String default_value;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 顺序
|
||||
*/
|
||||
private BigDecimal order_seq;
|
||||
|
||||
/**
|
||||
* 默认值类型
|
||||
*/
|
||||
private String data_type;
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package org.nl.wms.pdm.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;
|
||||
|
||||
/**
|
||||
* @author Lxy
|
||||
* @description /
|
||||
* @date 2022-03-21
|
||||
**/
|
||||
@Data
|
||||
public class ProcessrouteDto implements Serializable {
|
||||
|
||||
/** 工艺路线标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long processroute_id;
|
||||
|
||||
/**
|
||||
* 工艺路线编码
|
||||
*/
|
||||
private String processroute_code;
|
||||
|
||||
/**
|
||||
* 工艺路线名称
|
||||
*/
|
||||
private String processroute_name;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String processroute_status;
|
||||
|
||||
/**
|
||||
* 明细数
|
||||
*/
|
||||
private BigDecimal detail_count;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private Long audit_optid;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String audit_optname;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private String audit_time;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long sysdeptid;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
private Long syscompanyid;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 外部标识
|
||||
*/
|
||||
private String ext_id;
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package org.nl.wms.pdm.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;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description /
|
||||
* @date 2022-03-22
|
||||
**/
|
||||
@Data
|
||||
public class ProductprocessrouteDto implements Serializable {
|
||||
|
||||
/** 产品工艺路线标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long productprocess_id;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private Long material_id;
|
||||
|
||||
/** 工艺路线标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long processroute_id;
|
||||
|
||||
/**
|
||||
* 产品工艺路线状态
|
||||
*/
|
||||
private String productprocess_status;
|
||||
|
||||
/**
|
||||
* 明细数
|
||||
*/
|
||||
private BigDecimal detail_count;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private Long audit_optid;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String audit_optname;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private String audit_time;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long sysdeptid;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
private Long syscompanyid;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 外部标识
|
||||
*/
|
||||
private String ext_id;
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
package org.nl.wms.pdm.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;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description /
|
||||
* @date 2022-10-08
|
||||
**/
|
||||
@Data
|
||||
public class RawfoilworkorderDto implements Serializable {
|
||||
|
||||
/** 工单标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long workorder_id;
|
||||
|
||||
/**
|
||||
* 母卷号
|
||||
*/
|
||||
private String container_name;
|
||||
|
||||
/**
|
||||
* 机台编码
|
||||
*/
|
||||
private String resource_name;
|
||||
|
||||
/**
|
||||
* 生产工单
|
||||
*/
|
||||
private String mfg_order_name;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String product_name;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 理论长度
|
||||
*/
|
||||
private BigDecimal theory_height;
|
||||
|
||||
/**
|
||||
* 设备生产速度
|
||||
*/
|
||||
private BigDecimal eqp_velocity;
|
||||
|
||||
/**
|
||||
* 上卷开始时间
|
||||
*/
|
||||
private String up_coiler_date;
|
||||
|
||||
/**
|
||||
* 是否重新更新
|
||||
*/
|
||||
private String is_reload_send;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private BigDecimal productin_qty;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String realstart_time;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String realend_time;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 完成方式
|
||||
*/
|
||||
private String finish_type;
|
||||
|
||||
/**
|
||||
* 车号
|
||||
*/
|
||||
private String agvno;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 生产区域
|
||||
*/
|
||||
private String product_area;
|
||||
|
||||
/**
|
||||
* 点位编码
|
||||
*/
|
||||
private String point_code;
|
||||
}
|
||||
@@ -1,179 +0,0 @@
|
||||
package org.nl.wms.pdm.service.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description /
|
||||
* @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 String 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 update_optid;
|
||||
|
||||
/** 修改人姓名 */
|
||||
private String update_optname;
|
||||
|
||||
/** 修改时间 */
|
||||
private String update_time;
|
||||
|
||||
/** 部门ID */
|
||||
private String sysdeptid;
|
||||
|
||||
/** 公司ID */
|
||||
private String 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;
|
||||
|
||||
/** 销售订单及行号 */
|
||||
private String sale_order_name;
|
||||
|
||||
/** 是否呼叫 */
|
||||
private String is_call;
|
||||
|
||||
/** 呼叫时间 */
|
||||
private String call_time;
|
||||
|
||||
/** 是否呼叫纸管 */
|
||||
private String is_paper_ok;
|
||||
|
||||
/** 上下轴(1,2) */
|
||||
private String up_or_down;
|
||||
|
||||
/** 左右(1,2) */
|
||||
private String left_or_right;
|
||||
|
||||
/** 气涨轴规格 */
|
||||
private String qzz_size;
|
||||
|
||||
/** 气涨轴代数 */
|
||||
private String qzz_generation;
|
||||
|
||||
/** 子卷等级*/
|
||||
private String level;
|
||||
|
||||
/** 子卷重量 */
|
||||
private String weight;
|
||||
|
||||
/** 接头数 */
|
||||
private String joint_type;
|
||||
|
||||
/** 物料类型 */
|
||||
private String material_type;
|
||||
|
||||
/** 分切重量 */
|
||||
private String paper_weight;
|
||||
/** 木箱物料编码 */
|
||||
private String box_code;
|
||||
/** 木箱描述 */
|
||||
private String box_description;
|
||||
/** 批次号 */
|
||||
private String pscn;
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
package org.nl.wms.pdm.service.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ldjun
|
||||
* @description /
|
||||
* @date 2021-12-19
|
||||
**/
|
||||
@Data
|
||||
public class WorkProcedureDto implements Serializable {
|
||||
|
||||
/** 工序标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long workprocedure_id;
|
||||
private Long sysdeptid;
|
||||
private Long syscompanyid;
|
||||
|
||||
/**
|
||||
* 工序编码
|
||||
*/
|
||||
private String workprocedure_code;
|
||||
|
||||
/**
|
||||
* 工序名称
|
||||
*/
|
||||
private String workprocedure_name;
|
||||
|
||||
/**
|
||||
* 是否关键工序
|
||||
*/
|
||||
private String is_keyworkprocedure;
|
||||
|
||||
/**
|
||||
* 是否完工汇报
|
||||
*/
|
||||
private String is_finishback;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String is_used;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 外部标识
|
||||
*/
|
||||
private String ext_id;
|
||||
|
||||
/**
|
||||
* 业务组织标识
|
||||
*/
|
||||
private Long org_id;
|
||||
|
||||
/**
|
||||
* 业务组织编码
|
||||
*/
|
||||
private String org_code;
|
||||
|
||||
/**
|
||||
* 业务组织名字
|
||||
*/
|
||||
private String org_name;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
}
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
//package org.nl.wms.pdm.service.impl;
|
||||
//
|
||||
//
|
||||
//import cn.hutool.core.date.DateUtil;
|
||||
//import cn.hutool.core.map.MapUtil;
|
||||
//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.common.utils.SecurityUtils;
|
||||
//import org.nl.modules.common.exception.BadRequestException;
|
||||
//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.basedata.st.service.impl.UserAreaServiceImpl;
|
||||
//import org.nl.wms.pdm.service.RawfoilworkorderService;
|
||||
//import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
||||
//import org.springframework.data.domain.Pageable;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @author liuxy
|
||||
// * @description 服务实现
|
||||
// * @date 2022-10-08
|
||||
// **/
|
||||
//@Service
|
||||
//@RequiredArgsConstructor
|
||||
//@Slf4j
|
||||
//public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
|
||||
//
|
||||
// @Override
|
||||
// public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
// String product_area = MapUtil.getStr(whereJson, "product_area");
|
||||
// String resource_name = MapUtil.getStr(whereJson, "resource_name");
|
||||
// String status = MapUtil.getStr(whereJson, "status");
|
||||
// String container_name = MapUtil.getStr(whereJson, "container_name");
|
||||
// String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
// String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
//
|
||||
// //获取人员对应的区域
|
||||
// UserAreaServiceImpl userAreaService = new UserAreaServiceImpl();
|
||||
// String in_area_id = userAreaService.getInArea();
|
||||
//
|
||||
// JSONObject map = new JSONObject();
|
||||
// map.put("flag", "1");
|
||||
// if (ObjectUtil.isNotEmpty(resource_name)) {
|
||||
// map.put("resource_name", "%" + resource_name + "%");
|
||||
// }
|
||||
// if (ObjectUtil.isNotEmpty(container_name)) {
|
||||
// map.put("container_name", "%" + container_name + "%");
|
||||
// }
|
||||
// map.put("begin_time", begin_time);
|
||||
// map.put("end_time", end_time);
|
||||
// map.put("product_area", product_area);
|
||||
// map.put("status", status);
|
||||
// if (ObjectUtil.isNotEmpty(in_area_id)) {
|
||||
// map.put("in_area_id", in_area_id);
|
||||
// }
|
||||
//
|
||||
// JSONObject json = WQL.getWO("PDM_BI_RAWFOILWORKORDER_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "der.container_name");
|
||||
// return json;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<RawfoilworkorderDto> queryAll(Map whereJson) {
|
||||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
// JSONArray arr = wo.query().getResultJSONArray(0);
|
||||
// if (ObjectUtil.isNotEmpty(arr)) {
|
||||
// return arr.toJavaList(RawfoilworkorderDto.class);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public RawfoilworkorderDto findById(Long workorder_id) {
|
||||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
// JSONObject json = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(json)) {
|
||||
// return json.toJavaObject(RawfoilworkorderDto.class);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public RawfoilworkorderDto findByCode(String code) {
|
||||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
// JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(json)) {
|
||||
// return json.toJavaObject(RawfoilworkorderDto.class);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void create(RawfoilworkorderDto dto) {
|
||||
// WQLObject schBasePointService = WQLObject.getWQLObject("ST_IVT_SbPointIvt");
|
||||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
// WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
//
|
||||
// String container_name = dto.getContainer_name();
|
||||
// JSONObject json = wo.query("container_name = '" + container_name + "' and status <> '09'").uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(json)) {
|
||||
// throw new BadRequestException("母卷号已存在");
|
||||
// }
|
||||
//
|
||||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
// String nickName = SecurityUtils.getCurrentNickName();
|
||||
// String now = DateUtil.now();
|
||||
//
|
||||
// JSONObject jsonPoint = schBasePointService.query("ext_code ='" + dto.getResource_name() + "'").uniqueResult(0);
|
||||
// if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||
// throw new BadRequestException("点位设备不存在");
|
||||
// }
|
||||
//
|
||||
// JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
// if (ObjectUtil.isEmpty(josnMater)) {
|
||||
// throw new BadRequestException("物料不存在");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// 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);
|
||||
// dto.setIs_delete("0");
|
||||
// dto.setProduct_area(jsonPoint.getString("product_area"));
|
||||
// dto.setPoint_code(jsonPoint.getString("point_code"));
|
||||
// dto.setStatus("00");
|
||||
//
|
||||
// JSONObject json1 = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
// wo.insert(json1);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void update(RawfoilworkorderDto dto) {
|
||||
// RawfoilworkorderDto entity = this.findById(dto.getWorkorder_id());
|
||||
// if (entity == null) {
|
||||
// throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
// }
|
||||
//
|
||||
// WQLObject schBasePointService = WQLObject.getWQLObject("ST_IVT_SbPointIvt");
|
||||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
// WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
//
|
||||
// String container_name = dto.getContainer_name();
|
||||
//
|
||||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
// String nickName = SecurityUtils.getCurrentNickName();
|
||||
// String now = DateUtil.now();
|
||||
//
|
||||
// JSONObject jsonPoint = schBasePointService.query("ext_code ='" + dto.getResource_name() + "'").uniqueResult(0);
|
||||
// if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||
// throw new BadRequestException("点位设备不存在");
|
||||
// }
|
||||
//
|
||||
// JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
// if (ObjectUtil.isEmpty(josnMater)) {
|
||||
// throw new BadRequestException("物料不存在");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// dto.setUpdate_time(now);
|
||||
// dto.setUpdate_optid(currentUserId);
|
||||
// dto.setUpdate_optname(nickName);
|
||||
// dto.setProduct_area(jsonPoint.getString("product_area"));
|
||||
// dto.setPoint_code(jsonPoint.getString("point_code"));
|
||||
//
|
||||
// JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
// wo.update(json);
|
||||
//
|
||||
// JSONArray resultJSONArray = wo.query("container_name = '" + container_name + "' and status <> '09'").getResultJSONArray(0);
|
||||
// if (resultJSONArray.size() > 1) {
|
||||
// throw new BadRequestException("母卷号已存在");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void deleteAll(Long[] ids) {
|
||||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
// String nickName = SecurityUtils.getCurrentNickName();
|
||||
// String now = DateUtil.now();
|
||||
//
|
||||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
// 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 compelEnd(JSONObject whereJson) {
|
||||
// String workorder_id = whereJson.getString("workorder_id");
|
||||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
// String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
//
|
||||
// //查询该生箔工单是否存在未完成的任务
|
||||
// String container_name = whereJson.getString("container_name");
|
||||
//
|
||||
// JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("material_code = '" + container_name + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
// if (ObjectUtil.isNotEmpty(task_jo)) {
|
||||
// throw new BadRequestException("该生箔工单存在未完成的任务,请先完成任务!");
|
||||
// }
|
||||
//
|
||||
// WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
|
||||
//
|
||||
// JSONObject json = tab.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
||||
// json.put("status", "09");
|
||||
// json.put("finish_type", "02");
|
||||
// json.put("realend_time", DateUtil.now());
|
||||
// json.put("update_optid", currentUserId);
|
||||
// json.put("update_optname", currentUsername);
|
||||
// json.put("update_time", DateUtil.now());
|
||||
// tab.update(json);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void confirm(JSONObject whereJson) {
|
||||
// WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
|
||||
// String productin_qty = whereJson.getString("productin_qty");
|
||||
//
|
||||
// JSONObject jsonRaw = tab.query("workorder_id = '" + whereJson.getString("workorder_id") + "'").uniqueResult(0);
|
||||
// if (ObjectUtil.isEmpty(productin_qty)) {
|
||||
// jsonRaw.put("productin_qty", 0);
|
||||
// } else {
|
||||
// jsonRaw.put("productin_qty", whereJson.getDoubleValue("productin_qty"));
|
||||
// }
|
||||
// tab.update(jsonRaw);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -1,346 +0,0 @@
|
||||
package org.nl.wms.pdm.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.mapper.PdmBiSlittingproductionplanMapper;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
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.basedata.st.service.impl.UserAreaServiceImpl;
|
||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||
import org.nl.wms.pdm.service.SlittingproductionplanService;
|
||||
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description 服务实现
|
||||
* @date 2022-10-09
|
||||
**/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class SlittingproductionplanServiceImpl implements SlittingproductionplanService {
|
||||
|
||||
private final LmsToMesService lmsToMesService;
|
||||
@Autowired
|
||||
PdmBiSlittingproductionplanMapper pdmBiSlittingproductionplanMapper;
|
||||
|
||||
@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 qzzno = MapUtil.getStr(whereJson, "qzzno");
|
||||
String is_parent_ok = MapUtil.getStr(whereJson, "is_parent_ok");
|
||||
String is_child_tz_ok = MapUtil.getStr(whereJson, "is_child_tz_ok");
|
||||
String is_child_ps_ok = MapUtil.getStr(whereJson, "is_child_ps_ok");
|
||||
String is_call = MapUtil.getStr(whereJson, "is_call");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
|
||||
//获取人员对应的区域
|
||||
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl();
|
||||
String in_area_id = userAreaService.getInArea();
|
||||
|
||||
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);
|
||||
map.put("is_parent_ok", is_parent_ok);
|
||||
map.put("is_child_tz_ok", is_child_tz_ok);
|
||||
map.put("is_child_ps_ok", is_child_ps_ok);
|
||||
map.put("is_call", is_call);
|
||||
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 + "%");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(qzzno)) {
|
||||
map.put("qzzno", "%" + qzzno + "%");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(in_area_id)) {
|
||||
map.put("in_area_id", in_area_id);
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("PDM_BI_SLIDTTINGPLAN_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "LEFT(plan.start_time,10) DESC, container_name desc, split_group");
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PdmBiSlittingproductionplan> queryAll(Map whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan");
|
||||
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(arr)) {
|
||||
return arr.toJavaList(PdmBiSlittingproductionplan.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdmBiSlittingproductionplan 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(PdmBiSlittingproductionplan.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdmBiSlittingproductionplan 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(PdmBiSlittingproductionplan.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(PdmBiSlittingproductionplan dto) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
|
||||
dto.setIs_call("0");
|
||||
dto.setStatus("01");
|
||||
dto.setIs_delete("0");
|
||||
dto.setIs_paper_ok("0");
|
||||
dto.setIs_child_tz_ok("0");
|
||||
dto.setIs_child_ps_ok("0");
|
||||
dto.setIs_parent_ok("0");
|
||||
if ("1".equals(dto.getOrder_type())){
|
||||
dto.setMaterial_type("FG1");
|
||||
}else {
|
||||
dto.setMaterial_type("FG2");
|
||||
}
|
||||
pdmBiSlittingproductionplanMapper.insert(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(PdmBiSlittingproductionplan dto) {
|
||||
PdmBiSlittingproductionplan entity = this.findById(dto.getWorkorder_id());
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
String 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) {
|
||||
String 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");
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
|
||||
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
JSONObject mom_jo = new JSONObject();
|
||||
JSONObject json = data.getJSONObject(i);
|
||||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
||||
HashMap map = new HashMap<>();
|
||||
map.put("is_parent_ok", "1");
|
||||
map.put("update_optid", currentUserId);
|
||||
map.put("update_optname", currentUsername);
|
||||
map.put("update_time", DateUtil.now());
|
||||
if ("1".equals(jsonObject.getString("order_type"))) {
|
||||
tab.update(map, "parent_container_name = '" + json.getString("parent_container_name") + "'");
|
||||
mom_jo.put("contain_name", json.getString("contain_name"));
|
||||
mom_jo.put("warehouse", "1");
|
||||
} else {
|
||||
tab.update(map, "restruct_container_name = '" + json.getString("restruct_container_name") + "'");
|
||||
mom_jo.put("container_name", json.getString("contain_name"));
|
||||
mom_jo.put("package_box_sn", json.getString("package_box_sn"));
|
||||
mom_jo.put("warehouse", "3");
|
||||
}
|
||||
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssArrival'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
lmsToMesService.cutPlanMomRollDeliveryComplete(mom_jo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void caseFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String 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);
|
||||
|
||||
//调用MES接口,通知MES已经套轴完成
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("container_name", jsonObject.getString("container_name"));
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sendFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String 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.isEmpty(jsonObject.getString("qzzno"))) {
|
||||
throw new BadRequestException("还未绑定气涨轴!");
|
||||
}
|
||||
HashMap map = new HashMap();
|
||||
jsonObject.put("is_child_ps_ok", "1");
|
||||
jsonObject.put("status", "03");
|
||||
jsonObject.put("update_optid", currentUserId);
|
||||
jsonObject.put("update_optname", currentUsername);
|
||||
jsonObject.put("update_time", DateUtil.now());
|
||||
tab.update(jsonObject);
|
||||
|
||||
//调用MES接口,通知MES已经套轴完成
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("container_name", jsonObject.getString("container_name"));
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
lmsToMesService.airSwellWithPaperTubeAssArrival(jo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void inFinish(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
String 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.isEmpty(jsonObject.getString("qzzno"))) {
|
||||
throw new BadRequestException("还未绑定气涨轴!");
|
||||
}
|
||||
HashMap map = new HashMap();
|
||||
jsonObject.put("is_child_ps_ok", "1");
|
||||
jsonObject.put("status", "05");
|
||||
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");
|
||||
String 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"), "09")) {
|
||||
throw new BadRequestException("此单号:" + jsonObject.getString("mfg_order_name") + "已完成");
|
||||
}
|
||||
jsonObject.put("status", "09");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -151,7 +151,9 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品编码" prop="product_name">
|
||||
<el-input v-model="form.product_name" style="width: 250px;" />
|
||||
<el-input v-model="form.product_name" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater()" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -159,7 +161,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品名称" prop="description">
|
||||
<el-input v-model="form.description" style="width: 250px;" />
|
||||
<el-input v-model="form.description" disabled style="width: 250px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -264,12 +266,14 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<Dialog :dialog-show.sync="dialogShow" :open-param="openParam" />
|
||||
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRawfoilworkorder from '@/views/wms/pdm/order/rawfoilworkorder/rawfoilworkorder'
|
||||
import Dialog from '@/views/wms/pdm/order/rawfoilworkorder/Dialog'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -306,7 +310,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'Rawfoilworkorder',
|
||||
dicts: ['product_area', 'product_status', 'IS_OR_NOT'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Dialog },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Dialog, MaterDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -330,6 +334,7 @@ export default {
|
||||
openParam: null,
|
||||
permission: {},
|
||||
resourceList: [],
|
||||
materShow: false,
|
||||
rules: {
|
||||
container_name: [
|
||||
{ required: true, message: '母卷号不能为空', trigger: 'blur' }
|
||||
@@ -371,6 +376,9 @@ export default {
|
||||
hand() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
async queryMater() {
|
||||
this.materShow = true
|
||||
},
|
||||
formatStatusName(row) {
|
||||
return this.dict.label.product_status[row.status]
|
||||
},
|
||||
@@ -391,6 +399,10 @@ export default {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.form.product_name = row.material_code
|
||||
this.form.description = row.material_name
|
||||
},
|
||||
weigh() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
this.openParam = _selectData[0]
|
||||
|
||||
@@ -626,11 +626,11 @@
|
||||
<el-table-column v-if="false" prop="workorder_id" label="分切计划标识" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName" />
|
||||
<el-table-column prop="order_type" label="订单类型" :formatter="formatTypeName" />
|
||||
<el-table-column prop="mfg_order_name" label="订单号" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="toView2(scope.$index, scope.row)">{{ scope.row.mfg_order_name }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mfg_order_name" label="订单号" min-width="200" />
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-link type="primary" @click="toView2(scope.$index, scope.row)">{{ scope.row.mfg_order_name }}</el-link>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="container_name" label="子卷号" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="parent_container_name" label="母卷号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="ware_house" label="来源位置" :formatter="formatHouseName" width="120px" />
|
||||
|
||||
Reference in New Issue
Block a user