add 功能测试bug修改

This commit is contained in:
ls
2026-02-05 13:24:41 +08:00
parent 9a6b3973fd
commit 3f836d4e53
16 changed files with 225 additions and 339 deletions

View File

@@ -255,6 +255,10 @@ public class SchBasePoint extends Model<SchBasePoint> {
private String update_optname;
/**
* 修改时间
*/
@@ -275,6 +279,8 @@ public class SchBasePoint extends Model<SchBasePoint> {
/**
* 获取主键值
*

View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.nl.b_lms.sch.point.dao.SchBasePoint;
import org.nl.b_lms.sch.point.dto.SchBasePointDto;
import java.util.List;
@@ -54,7 +55,7 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
List<SchBasePoint> selectList(@Param("param") JSONObject map);
List<SchBasePoint> selectDjwPoints(@Param("param") JSONObject map);
List<SchBasePointDto> selectDjwPoints( JSONObject map);
@Select("SELECT * FROM sch_base_point WHERE region_code = 'BLKCK' and is_used = '1'")
List<SchBasePoint> selectByReginCode();

View File

@@ -173,106 +173,133 @@
ORDER BY po.in_order_seq DESC
</select>
<select id="selectDjwPoints" resultType="org.nl.b_lms.sch.point.dao.SchBasePoint"
parameterType="com.alibaba.fastjson.JSONObject">
<!-- <select id="selectDjwPoints" resultType="org.nl.b_lms.sch.point.dto.SchBasePointDto"-->
<!-- >-->
<!-- SELECT-->
<!-- a.*,-->
<!-- b.num-->
<!-- FROM-->
<!-- sch_base_point a-->
<!-- INNER JOIN (-->
<!-- SELECT-->
<!-- COUNT(c.task_id) AS num,-->
<!-- c.point_code-->
<!-- FROM-->
<!-- (-->
<!-- SELECT-->
<!-- task.task_id,-->
<!-- point_code-->
<!-- FROM-->
<!-- SCH_BASE_Point po-->
<!-- LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code-->
<!-- AND task.task_status <![CDATA[ < ]]> '07'-->
<!-- AND task.is_delete = '0'-->
<!-- WHERE-->
<!-- po.is_delete = '0'-->
<!-- AND po.is_used = '1'-->
<!-- <if test="reging_id != null and reging_id != ''">-->
<!-- AND po.region_id = #{reging_id}-->
<!-- </if>-->
<!-- AND po.point_location = #{point_location}-->
<!-- <if test="point_type != null and point_type != ''">-->
<!-- AND po.point_type = #{point_type}-->
<!-- </if>-->
<!-- <if test="point_type == '5'">-->
<!-- AND IFNULL(po.material_code, '') = ''-->
<!-- </if>-->
<!-- <if test="mater_flag == '1'">-->
<!-- AND IFNULL(po.material_code, '') = ''-->
<!-- </if>-->
<!-- UNION-->
<!-- SELECT-->
<!-- task.task_id,-->
<!-- point_code-->
<!-- FROM-->
<!-- SCH_BASE_Point po-->
<!-- LEFT JOIN sch_base_task task ON task.point_code2 = po.point_code-->
<!-- AND task.task_status <![CDATA[ < ]]> '07'-->
<!-- AND task.is_delete = '0'-->
<!-- WHERE-->
<!-- po.is_delete = '0'-->
<!-- AND po.is_used = '1'-->
<!-- <if test="reging_id != null and reging_id != ''">-->
<!-- AND po.region_id = #{reging_id}-->
<!-- </if>-->
<!-- <if test="point_location != null and point_location != ''">-->
<!-- AND po.point_location = #{point_location}-->
<!-- </if>-->
<!-- <if test="point_type != null and point_type != ''">-->
<!-- AND po.point_type = #{point_type}-->
<!-- </if>-->
<!-- <if test="point_type == '5'">-->
<!-- AND IFNULL(po.material_code, '') = ''-->
<!-- </if>-->
<!-- <if test="mater_flag == '1'">-->
<!-- AND IFNULL(po.material_code, '') = ''-->
<!-- </if>-->
<!-- UNION-->
<!-- SELECT-->
<!-- task.task_id,-->
<!-- point_code-->
<!-- FROM-->
<!-- SCH_BASE_Point po-->
<!-- LEFT JOIN sch_base_task task ON task.point_code3 = po.point_code-->
<!-- AND task.task_status <![CDATA[ < ]]> '07'-->
<!-- AND task.is_delete = '0'-->
<!-- WHERE-->
<!-- po.is_delete = '0'-->
<!-- AND po.is_used = '1'-->
<!-- <if test="reging_id != null and reging_id != ''">-->
<!-- AND po.region_id = #{reging_id}-->
<!-- </if>-->
<!-- <if test="point_location != null and point_location != ''">-->
<!-- AND po.point_location = #{point_location}-->
<!-- </if>-->
<!-- <if test="point_type != null and point_type != ''">-->
<!-- AND po.point_type = #{point_type}-->
<!-- </if>-->
<!-- <if test="point_type == '5'">-->
<!-- AND IFNULL(po.material_code, '') = ''-->
<!-- </if>-->
<!-- <if test="mater_flag == '1'">-->
<!-- AND IFNULL(po.material_code, '') = ''-->
<!-- </if>-->
<!-- ) c-->
<!-- GROUP BY-->
<!-- c.point_code-->
<!-- ) b ON b.point_code = a.point_code-->
<!-- ORDER BY num, a.point_code-->
<!-- </select>-->
<select id="selectDjwPoints" resultType="org.nl.b_lms.sch.point.dto.SchBasePointDto">
SELECT
a.*,
b.num
FROM
sch_base_point a
INNER JOIN (
SELECT
COUNT(c.task_id) AS num,
c.point_code
FROM
(
SELECT
task.task_id,
point_code
FROM
SCH_BASE_Point po
LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code
AND task.task_status <![CDATA[ < ]]> '07'
AND task.is_delete = '0'
WHERE
po.is_delete = '0'
AND po.is_used = '1'
<if test="reging_id != null and reging_id != ''">
AND po.region_id = #{reging_id}
</if>
*
FROM
SCH_BASE_Point po
WHERE
po.is_delete = '0'
AND po.is_used = '1'
<if test="reging_id != null and reging_id != ''">
AND po.region_id = #{reging_id}
</if>
<if test="point_location != null and point_location != ''">
AND po.point_location = #{point_location}
</if>
<if test="point_type != null and point_type != ''">
AND po.point_type = #{point_type}
</if>
<if test="point_type == '5'">
AND IFNULL(po.material_code, '') = ''
</if>
<if test="mater_flag == '1'">
AND IFNULL(po.material_code, '') = ''
</if>
AND po.point_location = #{point_location}
<if test="point_type != null and point_type != ''">
AND po.point_type = #{point_type}
</if>
<if test="point_type == '5'">
AND IFNULL(po.material_code, '') = ''
</if>
<if test="mater_flag == '1'">
AND IFNULL(po.material_code, '') = ''
</if>
UNION
SELECT
task.task_id,
point_code
FROM
SCH_BASE_Point po
LEFT JOIN sch_base_task task ON task.point_code2 = po.point_code
AND task.task_status <![CDATA[ < ]]> '07'
AND task.is_delete = '0'
WHERE
po.is_delete = '0'
AND po.is_used = '1'
<if test="reging_id != null and reging_id != ''">
AND po.region_id = #{reging_id}
</if>
<if test="point_location != null and point_location != ''">
AND po.point_location = #{point_location}
</if>
<if test="point_type != null and point_type != ''">
AND po.point_type = #{point_type}
</if>
<if test="point_type == '5'">
AND IFNULL(po.material_code, '') = ''
</if>
<if test="mater_flag == '1'">
AND IFNULL(po.material_code, '') = ''
</if>
UNION
SELECT
task.task_id,
point_code
FROM
SCH_BASE_Point po
LEFT JOIN sch_base_task task ON task.point_code3 = po.point_code
AND task.task_status <![CDATA[ < ]]> '07'
AND task.is_delete = '0'
WHERE
po.is_delete = '0'
AND po.is_used = '1'
<if test="reging_id != null and reging_id != ''">
AND po.region_id = #{reging_id}
</if>
<if test="point_location != null and point_location != ''">
AND po.point_location = #{point_location}
</if>
<if test="point_type != null and point_type != ''">
AND po.point_type = #{point_type}
</if>
<if test="point_type == '5'">
AND IFNULL(po.material_code, '') = ''
</if>
<if test="mater_flag == '1'">
AND IFNULL(po.material_code, '') = ''
</if>
) c
GROUP BY
c.point_code
) b ON b.point_code = a.point_code
ORDER BY num, a.point_code
</select>
</mapper>

View File

@@ -6,6 +6,7 @@ import java.io.Serializable;
import lombok.*;
import lombok.Data;
import lombok.Builder;
import org.nl.b_lms.sch.point.dao.SchBasePoint;
/**
@@ -18,173 +19,9 @@ import lombok.Builder;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SchBasePointDto implements Serializable {
public class SchBasePointDto extends SchBasePoint implements Serializable {
private static final long serialVersionUID = -7739291296662381396L;
/**
* 点位标识
*/
private Long point_id;
/**
* 点位编码
*/
private String point_code;
/**
* 点位名称
*/
private String point_name;
/**
* 所属区域
*/
private Long region_id;
/**
* 区域编码
*/
private String region_code;
/**
* 区域名称
*/
private String region_name;
/**
* 点位类型
*/
private String point_type;
/**
* 点位状态
*/
private String point_status;
/**
* 锁定类型
*/
private String lock_type;
/**
* 物料标识
*/
private Long material_id;
/**
* 设备编码
*/
private String device_code;
/**
* MES设备编码
*/
private String mes_device_code;
/**
* 允许的载具类型
*/
private String can_vehicle_type;
/**
* 载具允许最大数量
*/
private BigDecimal vehicle_max_qty;
/**
* 载具类型
*/
private String vehicle_type;
/**
* 载具编码
*/
private String vehicle_code;
/**
* 载具数量
*/
private BigDecimal vehicle_qty;
/**
* 块
*/
private BigDecimal block_num;
/**
* 排
*/
private BigDecimal row_num;
/**
* 列
*/
private BigDecimal col_num;
/**
* 层
*/
private BigDecimal layer_num;
/**
* 入库顺序
*/
private BigDecimal in_order_seq;
/**
* 出库顺序
*/
private BigDecimal out_order_seq;
/**
* 入空载具顺序
*/
private BigDecimal in_empty_seq;
/**
* 出空载具顺序
*/
private BigDecimal out_empty_seq;
/**
* 点位组编码
*/
private String point_group_code;
/**
* 是否建工单
*/
private String is_have_workder;
/**
* 在执行的任务标识
*/
private Long task_id;
/**
* 生产区域
*/
private String product_area;
/**
* 备注
*/
private String remark;
/**
* 来源标识
*/
private Long source_id;
/**
* 是否启用
*/
private String is_used;
/**
* 是否删除
*/
private String is_delete;
/**
* 创建人
*/
private Long create_id;
/**
* 创建人
*/
private String create_name;
/**
* 创建时间
*/
private String create_time;
/**
* 修改人
*/
private Long update_optid;
/**
* 修改人
*/
private String update_optname;
/**
* 修改时间
*/
private String update_time;
/**
* 位置
*/
private String point_location;
/**
* 物料编码
*/
private String material_code;
private Integer num;
}

View File

@@ -1,6 +1,6 @@
package org.nl.b_lms.sch.task.dao.mapper;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
import org.apache.ibatis.annotations.Param;
import org.nl.b_lms.sch.task.dao.SchBaseTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -34,4 +34,6 @@ public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
* @return
*/
List<SchBaseTask> checkHaveStartTask(String code);
Integer selectTaskCount(@Param("code") String code);
}

View File

@@ -28,4 +28,11 @@
AND is_delete = '0'
AND point_code1 = #{code}
</select>
<select id="selectTaskCount" resultType="java.lang.Integer" parameterType="java.lang.String">
SELECT count(1)
FROM sch_base_task
WHERE task_status <![CDATA[ < ]]> '07'
AND is_delete = '0'
AND (point_code1 = #{code} or point_code2 = #{code} or point_code3 = #{code})
</select>
</mapper>

View File

@@ -530,7 +530,7 @@ public class SlitterTaskUtil {
JSONObject item = jsonArray.getJSONObject(i);
String containerName = item.getString("container_name");
String site = item.getString("site");
String left_or_right = item.getString("left_or_right");
String left_or_right = item.getString("roll");
// 3. 检查 Plan 中是否存在对应的 container_name
if (!planMap.containsKey(containerName)) {

View File

@@ -1,19 +1,16 @@
package org.nl.config.mybatis;
import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.github.pagehelper.PageInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.annotation.PostConstruct;
import javax.sql.DataSource;
@EnableTransactionManagement
@@ -33,7 +30,7 @@ public class MybatisPlusConfig {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
//// // 分页插件
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
//乐观锁插件
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());

View File

@@ -17,6 +17,7 @@ import org.nl.b_lms.sch.point.dao.SchBasePoint;
import org.nl.b_lms.sch.point.dao.StIvtCoolregionio;
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
import org.nl.b_lms.sch.point.dao.mapper.StIvtCoolregionioMapper;
import org.nl.b_lms.sch.point.dto.SchBasePointDto;
import org.nl.b_lms.sch.task.dao.SchBaseTask;
import org.nl.b_lms.sch.task.dao.mapper.SchBaseTaskMapper;
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
@@ -48,10 +49,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
@@ -290,7 +289,7 @@ public class BakingServiceImpl implements BakingService {
String point_code3 = "";
SchBasePoint point = point_code2_jo.get(0);
HotPointIvt jsonHotIvt = getJsonObject(product_area, point, temperature);
if (ObjectUtil.isNotEmpty(jsonHotIvt)) {
if (ObjectUtil.isEmpty(jsonHotIvt)) {
throw new BadRequestException("烘烤区没有合适温度的空位!");
}
@@ -341,12 +340,12 @@ public class BakingServiceImpl implements BakingService {
stIvtCoolregionio.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId() + "");
stIvtCoolregionio.setBill_code(CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
stIvtCoolregionio.setIo_type("1");
stIvtCoolregionio.setMaterial_id(Long.getLong(jsonMater.getMaterial_id()));
stIvtCoolregionio.setMaterial_id(Long.parseLong(jsonMater.getMaterial_id()));
stIvtCoolregionio.setPcsn(container_name);
stIvtCoolregionio.setBill_status("50");
stIvtCoolregionio.setQty(jsonRaw.getProductin_qty());
stIvtCoolregionio.setTask_id(Long.getLong(task_id));
stIvtCoolregionio.setQty_unit_id(Long.getLong(jsonMater.getBase_unit_id()));
stIvtCoolregionio.setTask_id(Long.parseLong(task_id));
stIvtCoolregionio.setQty_unit_id(Long.parseLong(jsonMater.getBase_unit_id()));
stIvtCoolregionio.setStart_point_code(point_code1);
stIvtCoolregionio.setEnd_point_code(jsonHotIvt.getPoint_code());
stIvtCoolregionio.setCreate_mode("03");
@@ -415,16 +414,25 @@ public class BakingServiceImpl implements BakingService {
map.put("point_location", jsonHotIvt.getPoint_location());
//只找出箱点位
map.put("point_type", "5");
//先查半区可用点,查任务数
List<SchBasePointDto> pointArr = schBasePointMapper.selectDjwPoints(map);
List<SchBasePoint> pointArr = schBasePointMapper.selectDjwPoints(map);
if (ObjectUtil.isEmpty(pointArr)) {
throw new BadRequestException("没有无货且没有任务的点位类型为出箱的烘箱对接位!");
}
//查任务数最少的点位
for (SchBasePointDto schBasePointDto : pointArr) {
Integer num = schBaseTaskMapper.selectTaskCount(schBasePointDto.getPoint_code());
schBasePointDto.setNum(num);
}
List<SchBasePointDto> sortPointArr = pointArr.stream().sorted(Comparator.comparingInt(SchBasePointDto::getNum)).collect(Collectors.toList());
// 2.判断暂存位是否有任务:找到无任务的暂存位
String point_code2 = "";
for (int i = 0; i < pointArr.size(); i++) {
SchBasePoint jsonPoint = pointArr.get(i);
for (int i = 0; i < sortPointArr.size(); i++) {
SchBasePoint jsonPoint = sortPointArr.get(i);
String point_code = jsonPoint.getPoint_code();
SchBaseTask json_point_code1 = schBaseTaskMapper.selectOne(new LambdaQueryWrapper<SchBaseTask>().eq(SchBaseTask::getPoint_code1, point_code).ne(SchBaseTask::getTask_status, "07").eq(SchBaseTask::getIs_delete, "0"));
@@ -446,7 +454,7 @@ public class BakingServiceImpl implements BakingService {
param.put("point_code2", point_code2);
param.put("material_code", jsonHotIvt.getContainer_name());
param.put("product_area", jsonHotIvt.getProduct_area());
OutHotTask outHotTask = new OutHotTask();
OutHotTask outHotTask = SpringContextHolder.getBean(OutHotTask.class);
String task_id = outHotTask.createTask(param);
RawfoilWorkOrder jsonRaw = rawfoilWorkOrderMapper.selectOne(new LambdaQueryWrapper<RawfoilWorkOrder>().eq(RawfoilWorkOrder::getContainer_name, jsonHotIvt.getContainer_name()).eq(RawfoilWorkOrder::getIs_delete, "0"));
@@ -473,12 +481,13 @@ public class BakingServiceImpl implements BakingService {
hotParam.put("start_point_code", point_code1);
hotParam.put("end_point_code", point_code2);
boolean exists = redisUtils.hHasKey(point_code1, "temperature");
String point_temperature = "";
if (exists) {
point_temperature = (String) redisUtils.hget(point_code1, "temperature");
} else {
throw new BadRequestException("当前操作点位设备:" + point_code1 + ",无法获取温度,请稍后再试!");
}
//烘箱测试
String point_temperature = "2";
// if (exists) {
// point_temperature = (String) redisUtils.hget(point_code1, "temperature");
// } else {
// throw new BadRequestException("当前操作点位设备:" + point_code1 + ",无法获取温度,请稍后再试!");
// }
hotParam.put("temperature", point_temperature);
if (ObjectUtil.isEmpty(last_hot_mst)) {
hotParam.put("oven_time", "480");
@@ -733,12 +742,12 @@ public class BakingServiceImpl implements BakingService {
jsonCool.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId() + "");
jsonCool.setBill_code(CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
jsonCool.setIo_type("1");
jsonCool.setMaterial_id(Long.getLong(jsonMater.getMaterial_id()));
jsonCool.setMaterial_id(Long.parseLong(jsonMater.getMaterial_id()));
jsonCool.setPcsn(container_name);
jsonCool.setBill_status("50");
jsonCool.setQty(jsonRaw.getProductin_qty());
jsonCool.setQty_unit_id(Long.getLong(jsonMater.getBase_unit_id()));
jsonCool.setTask_id(Long.getLong(task_id));
jsonCool.setQty_unit_id(Long.parseLong(jsonMater.getBase_unit_id()));
jsonCool.setTask_id(Long.parseLong(task_id));
jsonCool.setStart_point_code(point_code1);
jsonCool.setEnd_point_code(jsonHotIvt.getPoint_code());
jsonCool.setCreate_mode("03");
@@ -766,11 +775,13 @@ public class BakingServiceImpl implements BakingService {
throw new BadRequestException("烘箱对接没有可用位置!");
}
JSONObject jsonMap = new JSONObject();
jsonMap.put("flag", "1");
jsonMap.put("product_area", product_area);
jsonMap.put("point_location", point_code2_jo.getPoint_location());
List<HotPointIvt> hot_rows = hotPointIvtMapper.selectHotPointList(jsonMap);
HotPointIvt jsonHotIvt = null;
//烘箱测试
HotPointIvt jsonHotIvt = hot_rows.get(0);
/**
for (int i = 0; i < hot_rows.size(); i++) {
HotPointIvt hot_row = hot_rows.get(i);
String point_code = hot_row.getPoint_code();
@@ -786,6 +797,7 @@ public class BakingServiceImpl implements BakingService {
}
}
}
**/
return jsonHotIvt;
}
@@ -889,12 +901,12 @@ public class BakingServiceImpl implements BakingService {
jsonCool.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId() + "");
jsonCool.setBill_code(CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
jsonCool.setIo_type("0");
jsonCool.setMaterial_id(Long.getLong(jsonMater.getMaterial_id()));
jsonCool.setMaterial_id(Long.parseLong(jsonMater.getMaterial_id()));
jsonCool.setPcsn(container_name);
jsonCool.setBill_status("10");
jsonCool.setQty(jsonRaw.getProductin_qty());
jsonCool.setQty_unit_id(Long.getLong(jsonMater.getBase_unit_id()));
jsonCool.setTask_id(Long.getLong(task_id));
jsonCool.setQty_unit_id(Long.parseLong(jsonMater.getBase_unit_id()));
jsonCool.setTask_id(Long.parseLong(task_id));
jsonCool.setStart_point_code(point_code1);
jsonCool.setEnd_point_code(endPointCode);
jsonCool.setCreate_mode("03");
@@ -936,7 +948,7 @@ public class BakingServiceImpl implements BakingService {
hotRegionIoMst.setStart_point_code(param.getString("start_point_code"));
hotRegionIoMst.setEnd_point_code(param.getString("end_point_code"));
hotRegionIoMst.setCreate_mode("03");
hotRegionIoMst.setTask_id(Long.getLong(param.getString("task_id")));
hotRegionIoMst.setTask_id(Long.parseLong(param.getString("task_id")));
hotRegionIoMst.setTask_type(param.getString("task_type"));
hotRegionIoMst.setTemperature(param.getBigDecimal("temperature"));
hotRegionIoMst.setOven_time(param.getBigDecimal("oven_time"));
@@ -1062,7 +1074,7 @@ public class BakingServiceImpl implements BakingService {
String point_code1 = whereJson.getString("point_code"); // 点位
//查询该点位是否存在未完成的任务
List<SchBaseTask> hasTask = schBaseTaskMapper.selectList(new LambdaQueryWrapper<SchBaseTask>().eq(SchBaseTask::getPoint_code1, point_code1).lt(SchBaseTask::getTask_status, "07").eq(SchBaseTask::getIs_delete, "0"));
if (hasTask != null) {
if (!hasTask.isEmpty()) {
SchBaseTask schBaseTask = hasTask.get(0);
throw new BadRequestException("当前点位" + point_code1 + "存在正在执行的任务" + schBaseTask.getTask_code());
}
@@ -1247,7 +1259,7 @@ public class BakingServiceImpl implements BakingService {
param.put("request_param", "1");//1-不合格入冷却 2-合格入冷却
InCoolIvtTask inCoolIvtTask = new InCoolIvtTask();
InCoolIvtTask inCoolIvtTask = SpringContextHolder.getBean(InCoolIvtTask.class);
String task_id = inCoolIvtTask.createTask(param);
// 生成冷却区出入表
@@ -1264,12 +1276,12 @@ public class BakingServiceImpl implements BakingService {
jsonCool.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId() + "");
jsonCool.setBill_code(CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
jsonCool.setIo_type("0");
jsonCool.setMaterial_id(Long.getLong(jsonMater.getMaterial_id()));
jsonCool.setMaterial_id(Long.parseLong(jsonMater.getMaterial_id()));
jsonCool.setPcsn(container_name);
jsonCool.setBill_status("10");
jsonCool.setQty(jsonRaw.getProductin_qty());
jsonCool.setQty_unit_id(Long.getLong(jsonMater.getBase_unit_id()));
jsonCool.setTask_id(Long.getLong(task_id));
jsonCool.setQty_unit_id(Long.parseLong(jsonMater.getBase_unit_id()));
jsonCool.setTask_id(Long.parseLong(task_id));
jsonCool.setStart_point_code(point_code1);
jsonCool.setEnd_point_code(endPointCode);
jsonCool.setCreate_mode("03");

View File

@@ -178,13 +178,12 @@ public class FeedingServiceImpl implements FeedingService {
throw new BadRequestException("当前登录人员暂无【" + cool_jo.getProduct_area() + "】操作权限");
}
}
String point_code = cool_jo.getPoint_code();
if (!StrUtil.equals(cool_jo.getFull_point_status(), "02")) {
throw new BadRequestException("该点位上不存在母卷!");
}
if (!StrUtil.equals(cool_jo.getContainer_name(), container_name)) {
throw new BadRequestException("该点位:" + point_code + "不存在母卷:" + container_name);
throw new BadRequestException("该点位:" + cool_jo.getFull_point_code() + "不存在母卷:" + container_name);
}
JSONObject result = new JSONObject();
result.put("message", "操作成功!");
@@ -194,14 +193,14 @@ public class FeedingServiceImpl implements FeedingService {
throw new BadRequestException("该分切机对应的上料位存在母卷,不能下发搬运任务!");
}
if (StrUtil.equals("01", cut_jo.getEmpty_point_status())) {
jo.put("point_code1", point_code);
jo.put("point_code2", next_point_code);
jo.put("point_code1", cool_jo.getFull_point_code());
jo.put("point_code2", cut_jo.getFull_point_code());
jo.put("vehicle_code", cool_jo.getContainer_name());
jo.put("product_area", cut_jo.getProduct_area());
jo.put("task_type", "010302");
} else {
jo.put("point_code1", point_code);
jo.put("point_code2", next_point_code);
jo.put("point_code1", cool_jo.getFull_point_code());
jo.put("point_code2", cut_jo.getFull_point_code());
jo.put("point_code3", cut_jo.getEmpty_point_code());
jo.put("point_code4", cool_jo.getEmpty_point_code());
jo.put("vehicle_code", cool_jo.getContainer_name());
@@ -233,11 +232,11 @@ public class FeedingServiceImpl implements FeedingService {
jsonCool.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId() + "");
jsonCool.setBill_code(CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
jsonCool.setIo_type("1");
jsonCool.setMaterial_id(Long.getLong(mater_jo.getMaterial_id()));
jsonCool.setMaterial_id(Long.parseLong(mater_jo.getMaterial_id()));
jsonCool.setPcsn(cool_jo.getContainer_name());
jsonCool.setBill_status("50");
jsonCool.setQty_unit_id(Long.getLong("1"));
jsonCool.setTask_id(Long.getLong(task_id));
jsonCool.setQty_unit_id(Long.parseLong("1"));
jsonCool.setTask_id(Long.parseLong(task_id));
jsonCool.setStart_point_code(cool_jo.getFull_point_code());
jsonCool.setEnd_point_code(cut_jo.getFull_point_code());
jsonCool.setCreate_mode("03");

View File

@@ -107,11 +107,11 @@
AND full_point_status = '01'
AND empty_point_status = '01'
<if test="point_type != null and point_type != ''">
AND point_type = #{point_type}
<if test="param.point_type != null and param.point_type != ''">
AND point_type = #{param.point_type}
</if>
<if test="point_type == null or point_type == ''">
<if test="param.point_type == null or param.point_type == ''">
AND point_type = '1'
</if>
@@ -124,12 +124,12 @@
AND is_delete = '0'
)
<if test="product_area != null and product_area != ''">
AND product_area = #{product_area}
<if test="param.product_area != null and param.product_area != ''">
AND product_area = #{param.product_area}
</if>
<if test="point_location != null and point_location != ''">
AND point_location = #{point_location}
<if test="param.point_location != null and param.point_location != ''">
AND point_location = #{param.point_location}
</if>
ORDER BY sort_seq DESC

View File

@@ -13,7 +13,7 @@
OR point_code1 = ivt.point_code
OR point_code2 = ivt.point_code
OR point_code4 = ivt.point_code)
AND task_status <![CDATA[<]]>] '07'
AND task_status <![CDATA[<]]> '07'
AND is_delete = '0'
)
<if test="jsonMap.getString('product_area') != null and jsonMap.getString('product_area') != ''">

View File

@@ -211,7 +211,7 @@ public class CoolCutTask extends AbstractAcsTask {
}
//单送满卷
if ("010302".equals(schBaseTask.getTask_status())) {
if ("010302".equals(schBaseTask.getTask_type())) {
// 更新主表状态
StIvtCoolregionio coolMst = stIvtCoolregionioMapper.selectOne(new LambdaQueryWrapper<StIvtCoolregionio>().eq(StIvtCoolregionio::getTask_id, task_id));
// JSONObject coolMst = ivtTab.query("task_id = '" + task_id + "'").uniqueResult(0);
@@ -238,7 +238,7 @@ public class CoolCutTask extends AbstractAcsTask {
StIvtCutpointivt cut_jo = stIvtCutpointivtMapper.selectOne(new LambdaQueryWrapper<StIvtCutpointivt>().eq(StIvtCutpointivt::getFull_point_code, point_code2));
cut_jo.setFull_point_status("02");
cut_jo.setContainer_name(container_name);
cut_jo.setUpdate_optid(Long.getLong(currentUserId));
cut_jo.setUpdate_optid(Long.parseLong(currentUserId));
cut_jo.setUpdate_optname(currentUsername);
cut_jo.setUpdate_time(DateUtil.now());
stIvtCutpointivtMapper.updateById(cut_jo);

View File

@@ -232,7 +232,7 @@ public class InCoolIvtTask extends AbstractAcsTask {
@Override
@Transactional(rollbackFor = Exception.class)
public String createTask(JSONObject form) {
CutConveyorTask cutConveyorTask = new CutConveyorTask();
CutConveyorTask cutConveyorTask = SpringContextHolder.getBean(CutConveyorTask.class);
String currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();

View File

@@ -194,19 +194,6 @@ public class InHotTask extends AbstractAcsTask {
String container_name = jsonCoolIvt.getContainer_name(); // 母卷号
String workorder_id = jsonCoolIvt.getWorkorder_id(); // 母卷工单标识
jsonCoolIvt.setFull_point_status("01");
jsonCoolIvt.setCool_ivt_status("01");
jsonCoolIvt.setContainer_name("");
jsonCoolIvt.setWorkorder_id("");
jsonCoolIvt.setIvt_qty(BigDecimal.valueOf(0));
jsonCoolIvt.setInstorage_time("");
jsonCoolIvt.setUpdate_optid(currentUserId);
jsonCoolIvt.setUpdate_optname(currentUsername);
jsonCoolIvt.setUpdate_time(DateUtil.now());
coolPointIvtMapper.updateById(jsonCoolIvt);
// 更新烘箱区库存状态
HotPointIvt jsonHotIvt = hotPointIvtMapper.selectOne(new LambdaQueryWrapper<HotPointIvt>().eq(HotPointIvt::getPoint_code, schBaseTask.getPoint_code3()));
jsonHotIvt.setPoint_status("02");
@@ -219,6 +206,17 @@ public class InHotTask extends AbstractAcsTask {
jsonHotIvt.setUpdate_time(DateUtil.now());
hotPointIvtMapper.updateById(jsonHotIvt);
jsonCoolIvt.setFull_point_status("01");
jsonCoolIvt.setCool_ivt_status("01");
jsonCoolIvt.setContainer_name("");
jsonCoolIvt.setWorkorder_id("");
jsonCoolIvt.setIvt_qty(BigDecimal.valueOf(0));
jsonCoolIvt.setInstorage_time("");
jsonCoolIvt.setUpdate_optid(currentUserId);
jsonCoolIvt.setUpdate_optname(currentUsername);
jsonCoolIvt.setUpdate_time(DateUtil.now());
coolPointIvtMapper.updateById(jsonCoolIvt);
hot_point_code = jsonHotIvt.getExt_code();
}

View File

@@ -192,7 +192,7 @@ public class OutHotTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public String createTask(JSONObject form) {
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
CutConveyorTask cutConveyorTask = new CutConveyorTask();
CutConveyorTask cutConveyorTask = SpringContextHolder.getBean(CutConveyorTask.class);
String currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();