Browse Source

报工部分代码修改

master
DouDou 2 years ago
parent
commit
cbf4332521
  1. 13
      src/main/java/com/spring/modules/schedule/mapper/BaseConfigMapper.java
  2. 6
      src/main/java/com/spring/modules/schedule/service/impl/ScheduleServiceImpl.java
  3. 29
      src/main/resources/mapper/schedule/BaseConfigMapper.xml

13
src/main/java/com/spring/modules/schedule/mapper/BaseConfigDataMapper.java → src/main/java/com/spring/modules/schedule/mapper/BaseConfigMapper.java

@ -12,7 +12,7 @@ import java.util.List;
* @version 1.0
*/
@Mapper
public interface BaseConfigDataMapper {
public interface BaseConfigMapper {
/**
* @description: 查询结果集
@ -28,5 +28,14 @@ public interface BaseConfigDataMapper {
* @date 2024/6/6 17:42
* @version 1.0
*/
List<BaseConfigData> getTblBaseDataByType(BaseConfigData BaseConfigData);
List<BaseConfigData> getBaseConfigList(BaseConfigData BaseConfigData);
/**
* @description: 查询单个配置的对象参数
* @author LR
* @date 2024/6/13 14:00
* @version 1.0
*/
BaseConfigData getSingleBaseConfig(BaseConfigData BaseConfigData);
}

6
src/main/java/com/spring/modules/schedule/service/impl/ScheduleServiceImpl.java

@ -3,6 +3,7 @@ package com.spring.modules.schedule.service.impl;
import com.spring.common.exception.XJException;
import com.spring.common.utils.DateUtils;
import com.spring.modules.schedule.data.*;
import com.spring.modules.schedule.mapper.BaseConfigMapper;
import com.spring.modules.schedule.mapper.ProcedureMapper;
import com.spring.modules.schedule.mapper.ScheduleMapper;
import com.spring.modules.schedule.service.ScheduleService;
@ -21,6 +22,8 @@ public class ScheduleServiceImpl implements ScheduleService {
private ScheduleMapper scheduleMapper;
@Autowired
private ProcedureMapper procedureMapper;
@Autowired
private BaseConfigMapper baseConfigMapper;
@Override
public List<ScheduleData> getProduceScheduleData(SearchScheduleData inData) {
@ -105,7 +108,8 @@ public class ScheduleServiceImpl implements ScheduleService {
throw new RuntimeException("当前材料料号:"+rmPartNo+"不能用于制造成品料号:"+partNo+"!");
}
BaseConfigData searchConfig = new BaseConfigData(site, "die_cutting", "check_out_flag");
String checkOutStockFlag = searchConfig.getBaseData();
BaseConfigData baseConfig = baseConfigMapper.getSingleBaseConfig(searchConfig);
String checkOutStockFlag = baseConfig.getBaseData();
//查询是否开启了时间空值的校验
if("Y".equalsIgnoreCase(checkOutStockFlag)){
//调用存储过程 检查出库的卷是否符合当前的要求

29
src/main/resources/mapper/schedule/BaseConfigDataMapper.xml → src/main/resources/mapper/schedule/BaseConfigMapper.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.spring.modules.schedule.mapper.BaseConfigData">
<mapper namespace="com.spring.modules.schedule.mapper.BaseConfigMapper">
<resultMap id="BaseResultMap" type="com.spring.modules.schedule.data.BaseConfigData">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="site" jdbcType="VARCHAR" property="site" />
@ -20,28 +20,43 @@
select tbl.id,tbl.site,tbl.type,tbl.second_type,tbl.base_data,tbl.base_desc,tbl.status,tbl.sort_no,tbl.remark
from tbl_base_data tbl
<where>
<if test="site != null AND site != ''">
<if test="site != null and site != ''">
and tbl.site=#{site,jdbcType=VARCHAR}
</if>
<if test="type != null AND type != ''">
<if test="type != null and type != ''">
and tbl.type = #{type,jdbcType=VARCHAR}
</if>
<if test="secondType != null AND secondType != ''">
<if test="secondType != null and secondType != ''">
and tbl.second_type = #{secondType}
</if>
</where>
</select>
<!--查询对象-->
<select id="getTblBaseDataList" parameterType="BaseConfigData" resultType="BaseConfigData">
<select id="getBaseConfigList" parameterType="BaseConfigData" resultType="BaseConfigData">
select tbl.id,tbl.site,tbl.type,tbl.second_type,tbl.base_data,tbl.base_desc,tbl.status,tbl.sort_no,tbl.remark
from tbl_base_data tbl
<where>
<if test="site != null AND site != ''">
<if test="site != null and site != ''">
and tbl.site=#{site,jdbcType=VARCHAR}
</if>
AND tbl.type = #{type,jdbcType=VARCHAR}
<if test="secondType != null AND secondType != ''">
<if test="secondType != null and secondType != ''">
AND tbl.second_type = #{secondType}
</if>
</where>
</select>
<!--查询单个对象-->
<select id="getSingleBaseConfig" parameterType="BaseConfigData" resultType="BaseConfigData">
select tbl.id,tbl.site,tbl.type,tbl.second_type,tbl.base_data,tbl.base_desc,tbl.status,tbl.sort_no,tbl.remark
from tbl_base_data tbl
<where>
<if test="site != null and site != ''">
and tbl.site=#{site,jdbcType=VARCHAR}
</if>
AND tbl.type = #{type,jdbcType=VARCHAR}
<if test="secondType != null and secondType != ''">
AND tbl.second_type = #{secondType}
</if>
</where>
Loading…
Cancel
Save