This commit is contained in:
JinLu.Yin 2022-07-27 22:43:31 +08:00
parent b7c3bf6b61
commit 9b67fd9386
8 changed files with 87 additions and 67 deletions

View File

@ -16,8 +16,8 @@ import com.ktg.common.annotation.Log;
import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.common.enums.BusinessType;
import com.ktg.mes.md.domain.MdProdutSop;
import com.ktg.mes.md.service.IMdProdutSopService;
import com.ktg.mes.md.domain.MdProductSop;
import com.ktg.mes.md.service.IMdProductSopService;
import com.ktg.common.utils.poi.ExcelUtil;
import com.ktg.common.core.page.TableDataInfo;
@ -29,20 +29,20 @@ import com.ktg.common.core.page.TableDataInfo;
*/
@RestController
@RequestMapping("/mes/md/sop")
public class MdProdutSopController extends BaseController
public class MdProductSopController extends BaseController
{
@Autowired
private IMdProdutSopService mdProdutSopService;
private IMdProductSopService mdProductSopService;
/**
* 查询产品SOP列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:list')")
@GetMapping("/list")
public TableDataInfo list(MdProdutSop mdProdutSop)
public TableDataInfo list(MdProductSop mdProdutSop)
{
startPage();
List<MdProdutSop> list = mdProdutSopService.selectMdProdutSopList(mdProdutSop);
List<MdProductSop> list = mdProductSopService.selectMdProductSopList(mdProdutSop);
return getDataTable(list);
}
@ -52,10 +52,10 @@ public class MdProdutSopController extends BaseController
@PreAuthorize("@ss.hasPermi('mes:md:sop:export')")
@Log(title = "产品SOP", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MdProdutSop mdProdutSop)
public void export(HttpServletResponse response, MdProductSop mdProdutSop)
{
List<MdProdutSop> list = mdProdutSopService.selectMdProdutSopList(mdProdutSop);
ExcelUtil<MdProdutSop> util = new ExcelUtil<MdProdutSop>(MdProdutSop.class);
List<MdProductSop> list = mdProductSopService.selectMdProductSopList(mdProdutSop);
ExcelUtil<MdProductSop> util = new ExcelUtil<MdProductSop>(MdProductSop.class);
util.exportExcel(response, list, "产品SOP数据");
}
@ -66,7 +66,7 @@ public class MdProdutSopController extends BaseController
@GetMapping(value = "/{sopId}")
public AjaxResult getInfo(@PathVariable("sopId") Long sopId)
{
return AjaxResult.success(mdProdutSopService.selectMdProdutSopBySopId(sopId));
return AjaxResult.success(mdProductSopService.selectMdProductSopBySopId(sopId));
}
/**
@ -75,9 +75,9 @@ public class MdProdutSopController extends BaseController
@PreAuthorize("@ss.hasPermi('mes:md:sop:add')")
@Log(title = "产品SOP", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MdProdutSop mdProdutSop)
public AjaxResult add(@RequestBody MdProductSop mdProdutSop)
{
return toAjax(mdProdutSopService.insertMdProdutSop(mdProdutSop));
return toAjax(mdProductSopService.insertMdProductSop(mdProdutSop));
}
/**
@ -86,9 +86,9 @@ public class MdProdutSopController extends BaseController
@PreAuthorize("@ss.hasPermi('mes:md:sop:edit')")
@Log(title = "产品SOP", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MdProdutSop mdProdutSop)
public AjaxResult edit(@RequestBody MdProductSop mdProdutSop)
{
return toAjax(mdProdutSopService.updateMdProdutSop(mdProdutSop));
return toAjax(mdProductSopService.updateMdProductSop(mdProdutSop));
}
/**
@ -99,6 +99,6 @@ public class MdProdutSopController extends BaseController
@DeleteMapping("/{sopIds}")
public AjaxResult remove(@PathVariable Long[] sopIds)
{
return toAjax(mdProdutSopService.deleteMdProdutSopBySopIds(sopIds));
return toAjax(mdProductSopService.deleteMdProductSopBySopIds(sopIds));
}
}

View File

@ -11,7 +11,7 @@ import com.ktg.common.core.domain.BaseEntity;
* @author yinjinlu
* @date 2022-07-26
*/
public class MdProdutSop extends BaseEntity
public class MdProductSop extends BaseEntity
{
private static final long serialVersionUID = 1L;

View File

@ -1,7 +1,7 @@
package com.ktg.mes.md.mapper;
import java.util.List;
import com.ktg.mes.md.domain.MdProdutSop;
import com.ktg.mes.md.domain.MdProductSop;
/**
* 产品SOPMapper接口
@ -9,7 +9,7 @@ import com.ktg.mes.md.domain.MdProdutSop;
* @author yinjinlu
* @date 2022-07-26
*/
public interface MdProdutSopMapper
public interface MdProductSopMapper
{
/**
* 查询产品SOP
@ -17,31 +17,31 @@ public interface MdProdutSopMapper
* @param sopId 产品SOP主键
* @return 产品SOP
*/
public MdProdutSop selectMdProdutSopBySopId(Long sopId);
public MdProductSop selectMdProductSopBySopId(Long sopId);
/**
* 查询产品SOP列表
*
* @param mdProdutSop 产品SOP
* @param mdProductSop 产品SOP
* @return 产品SOP集合
*/
public List<MdProdutSop> selectMdProdutSopList(MdProdutSop mdProdutSop);
public List<MdProductSop> selectMdProductSopList(MdProductSop mdProductSop);
/**
* 新增产品SOP
*
* @param mdProdutSop 产品SOP
* @param mdProductSop 产品SOP
* @return 结果
*/
public int insertMdProdutSop(MdProdutSop mdProdutSop);
public int insertMdProductSop(MdProductSop mdProductSop);
/**
* 修改产品SOP
*
* @param mdProdutSop 产品SOP
* @param mdProductSop 产品SOP
* @return 结果
*/
public int updateMdProdutSop(MdProdutSop mdProdutSop);
public int updateMdProductSop(MdProductSop mdProductSop);
/**
* 删除产品SOP
@ -49,7 +49,7 @@ public interface MdProdutSopMapper
* @param sopId 产品SOP主键
* @return 结果
*/
public int deleteMdProdutSopBySopId(Long sopId);
public int deleteMdProductSopBySopId(Long sopId);
/**
* 批量删除产品SOP
@ -57,5 +57,5 @@ public interface MdProdutSopMapper
* @param sopIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteMdProdutSopBySopIds(Long[] sopIds);
public int deleteMdProductSopBySopIds(Long[] sopIds);
}

View File

@ -1,7 +1,7 @@
package com.ktg.mes.md.service;
import java.util.List;
import com.ktg.mes.md.domain.MdProdutSop;
import com.ktg.mes.md.domain.MdProductSop;
/**
* 产品SOPService接口
@ -9,7 +9,7 @@ import com.ktg.mes.md.domain.MdProdutSop;
* @author yinjinlu
* @date 2022-07-26
*/
public interface IMdProdutSopService
public interface IMdProductSopService
{
/**
* 查询产品SOP
@ -17,7 +17,7 @@ public interface IMdProdutSopService
* @param sopId 产品SOP主键
* @return 产品SOP
*/
public MdProdutSop selectMdProdutSopBySopId(Long sopId);
public MdProductSop selectMdProductSopBySopId(Long sopId);
/**
* 查询产品SOP列表
@ -25,7 +25,7 @@ public interface IMdProdutSopService
* @param mdProdutSop 产品SOP
* @return 产品SOP集合
*/
public List<MdProdutSop> selectMdProdutSopList(MdProdutSop mdProdutSop);
public List<MdProductSop> selectMdProductSopList(MdProductSop mdProductSop);
/**
* 新增产品SOP
@ -33,7 +33,7 @@ public interface IMdProdutSopService
* @param mdProdutSop 产品SOP
* @return 结果
*/
public int insertMdProdutSop(MdProdutSop mdProdutSop);
public int insertMdProductSop(MdProductSop mdProductSop);
/**
* 修改产品SOP
@ -41,7 +41,7 @@ public interface IMdProdutSopService
* @param mdProdutSop 产品SOP
* @return 结果
*/
public int updateMdProdutSop(MdProdutSop mdProdutSop);
public int updateMdProductSop(MdProductSop mdProductSop);
/**
* 批量删除产品SOP
@ -49,7 +49,7 @@ public interface IMdProdutSopService
* @param sopIds 需要删除的产品SOP主键集合
* @return 结果
*/
public int deleteMdProdutSopBySopIds(Long[] sopIds);
public int deleteMdProductSopBySopIds(Long[] sopIds);
/**
* 删除产品SOP信息
@ -57,5 +57,5 @@ public interface IMdProdutSopService
* @param sopId 产品SOP主键
* @return 结果
*/
public int deleteMdProdutSopBySopId(Long sopId);
public int deleteMdProductSopBySopId(Long sopId);
}

View File

@ -4,9 +4,9 @@ import java.util.List;
import com.ktg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.md.mapper.MdProdutSopMapper;
import com.ktg.mes.md.domain.MdProdutSop;
import com.ktg.mes.md.service.IMdProdutSopService;
import com.ktg.mes.md.mapper.MdProductSopMapper;
import com.ktg.mes.md.domain.MdProductSop;
import com.ktg.mes.md.service.IMdProductSopService;
/**
* 产品SOPService业务层处理
@ -15,10 +15,10 @@ import com.ktg.mes.md.service.IMdProdutSopService;
* @date 2022-07-26
*/
@Service
public class MdProdutSopServiceImpl implements IMdProdutSopService
public class MdProductSopServiceImpl implements IMdProductSopService
{
@Autowired
private MdProdutSopMapper mdProdutSopMapper;
private MdProductSopMapper mdProductSopMapper;
/**
* 查询产品SOP
@ -27,9 +27,9 @@ public class MdProdutSopServiceImpl implements IMdProdutSopService
* @return 产品SOP
*/
@Override
public MdProdutSop selectMdProdutSopBySopId(Long sopId)
public MdProductSop selectMdProductSopBySopId(Long sopId)
{
return mdProdutSopMapper.selectMdProdutSopBySopId(sopId);
return mdProductSopMapper.selectMdProductSopBySopId(sopId);
}
/**
@ -39,9 +39,9 @@ public class MdProdutSopServiceImpl implements IMdProdutSopService
* @return 产品SOP
*/
@Override
public List<MdProdutSop> selectMdProdutSopList(MdProdutSop mdProdutSop)
public List<MdProductSop> selectMdProductSopList(MdProductSop mdProdutSop)
{
return mdProdutSopMapper.selectMdProdutSopList(mdProdutSop);
return mdProductSopMapper.selectMdProductSopList(mdProdutSop);
}
/**
@ -51,10 +51,10 @@ public class MdProdutSopServiceImpl implements IMdProdutSopService
* @return 结果
*/
@Override
public int insertMdProdutSop(MdProdutSop mdProdutSop)
public int insertMdProductSop(MdProductSop mdProdutSop)
{
mdProdutSop.setCreateTime(DateUtils.getNowDate());
return mdProdutSopMapper.insertMdProdutSop(mdProdutSop);
return mdProductSopMapper.insertMdProductSop(mdProdutSop);
}
/**
@ -64,10 +64,10 @@ public class MdProdutSopServiceImpl implements IMdProdutSopService
* @return 结果
*/
@Override
public int updateMdProdutSop(MdProdutSop mdProdutSop)
public int updateMdProductSop(MdProductSop mdProdutSop)
{
mdProdutSop.setUpdateTime(DateUtils.getNowDate());
return mdProdutSopMapper.updateMdProdutSop(mdProdutSop);
return mdProductSopMapper.updateMdProductSop(mdProdutSop);
}
/**
@ -77,9 +77,9 @@ public class MdProdutSopServiceImpl implements IMdProdutSopService
* @return 结果
*/
@Override
public int deleteMdProdutSopBySopIds(Long[] sopIds)
public int deleteMdProductSopBySopIds(Long[] sopIds)
{
return mdProdutSopMapper.deleteMdProdutSopBySopIds(sopIds);
return mdProductSopMapper.deleteMdProductSopBySopIds(sopIds);
}
/**
@ -89,8 +89,8 @@ public class MdProdutSopServiceImpl implements IMdProdutSopService
* @return 结果
*/
@Override
public int deleteMdProdutSopBySopId(Long sopId)
public int deleteMdProductSopBySopId(Long sopId)
{
return mdProdutSopMapper.deleteMdProdutSopBySopId(sopId);
return mdProductSopMapper.deleteMdProductSopBySopId(sopId);
}
}

View File

@ -2,6 +2,9 @@ package com.ktg.mes.pro.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ktg.mes.md.domain.MdProductSop;
import com.ktg.mes.md.service.IMdProductSopService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -34,6 +37,7 @@ public class ProTaskIssueController extends BaseController
@Autowired
private IProTaskIssueService proTaskIssueService;
/**
* 查询生产任务投料列表
*/

View File

@ -7,7 +7,9 @@ import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.common.enums.BusinessType;
import com.ktg.common.utils.StringUtils;
import com.ktg.mes.md.domain.MdProductSop;
import com.ktg.mes.md.domain.MdWorkstation;
import com.ktg.mes.md.service.IMdProductSopService;
import com.ktg.mes.md.service.IMdWorkstationService;
import com.ktg.mes.pro.domain.ProTask;
import com.ktg.mes.pro.domain.ProTaskIssue;
@ -48,6 +50,20 @@ public class ProTaskIssueMobController extends BaseController {
@Autowired
private IWmIssueLineService wmIssueLineService;
@Autowired
private IMdProductSopService mdProductSopService;
/**
* 获取当前产品的SOP
* @param mdProdutSop
* @return
*/
@GetMapping("getSopList")
public AjaxResult getSopList(MdProductSop mdProdutSop){
List<MdProductSop> list = mdProductSopService.selectMdProductSopList(mdProdutSop);
return AjaxResult.success(list);
}
/**
* 查询当前工作站当前任务的投料清单
* 至少提供workstationIdtaskId两个参数

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ktg.mes.md.mapper.MdProductSopMapper">
<resultMap type="MdProdutSop" id="MdProdutSopResult">
<resultMap type="MdProductSop" id="MdProductSopResult">
<result property="sopId" column="sop_id" />
<result property="itemId" column="item_id" />
<result property="orderNum" column="order_num" />
@ -25,12 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMdProdutSopVo">
select sop_id, item_id, order_num, process_id, process_code, process_name, sop_title, sop_description, sop_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from md_produt_sop
<sql id="selectMdProductSopVo">
select sop_id, item_id, order_num, process_id, process_code, process_name, sop_title, sop_description, sop_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from md_product_sop
</sql>
<select id="selectMdProdutSopList" parameterType="MdProdutSop" resultMap="MdProdutSopResult">
<include refid="selectMdProdutSopVo"/>
<select id="selectMdProductSopList" parameterType="MdProductSop" resultMap="MdProductSopResult">
<include refid="selectMdProductSopVo"/>
<where>
<if test="itemId != null "> and item_id = #{itemId}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
@ -43,13 +43,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectMdProdutSopBySopId" parameterType="Long" resultMap="MdProdutSopResult">
<include refid="selectMdProdutSopVo"/>
<select id="selectMdProductSopBySopId" parameterType="Long" resultMap="MdProductSopResult">
<include refid="selectMdProductSopVo"/>
where sop_id = #{sopId}
</select>
<insert id="insertMdProdutSop" parameterType="MdProdutSop" useGeneratedKeys="true" keyProperty="sopId">
insert into md_produt_sop
<insert id="insertMdProductSop" parameterType="MdProductSop" useGeneratedKeys="true" keyProperty="sopId">
insert into md_product_sop
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemId != null">item_id,</if>
<if test="orderNum != null">order_num,</if>
@ -90,8 +90,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateMdProdutSop" parameterType="MdProdutSop">
update md_produt_sop
<update id="updateMdProductSop" parameterType="MdProductSop">
update md_product_sop
<trim prefix="SET" suffixOverrides=",">
<if test="itemId != null">item_id = #{itemId},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
@ -114,12 +114,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sop_id = #{sopId}
</update>
<delete id="deleteMdProdutSopBySopId" parameterType="Long">
delete from md_produt_sop where sop_id = #{sopId}
<delete id="deleteMdProductSopBySopId" parameterType="Long">
delete from md_product_sop where sop_id = #{sopId}
</delete>
<delete id="deleteMdProdutSopBySopIds" parameterType="String">
delete from md_produt_sop where sop_id in
<delete id="deleteMdProductSopBySopIds" parameterType="String">
delete from md_product_sop where sop_id in
<foreach item="sopId" collection="array" open="(" separator="," close=")">
#{sopId}
</foreach>