流转单接口修改
This commit is contained in:
parent
9d1089843a
commit
92e300607d
@ -67,6 +67,18 @@
|
|||||||
<artifactId>ktg-mes</artifactId>
|
<artifactId>ktg-mes</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 打印模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ktg</groupId>
|
||||||
|
<artifactId>ktg-print</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- IOT模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ktg</groupId>
|
||||||
|
<artifactId>ktg-iot</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -233,6 +233,7 @@ public class UserConstants
|
|||||||
public static final String BARCODE_TYPE_WORKORDER = "WORKORDER";
|
public static final String BARCODE_TYPE_WORKORDER = "WORKORDER";
|
||||||
public static final String BARCODE_TYPE_TOOL = "TOOL";
|
public static final String BARCODE_TYPE_TOOL = "TOOL";
|
||||||
public static final String BARCODE_TYPE_SN = "SN";
|
public static final String BARCODE_TYPE_SN = "SN";
|
||||||
|
public static final String BARCODE_TYPE_PROCARD ="PROCARD";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,6 +7,7 @@ import com.ktg.common.constant.UserConstants;
|
|||||||
import com.ktg.common.utils.StringUtils;
|
import com.ktg.common.utils.StringUtils;
|
||||||
import com.ktg.mes.pro.domain.ProWorkorder;
|
import com.ktg.mes.pro.domain.ProWorkorder;
|
||||||
import com.ktg.mes.pro.service.IProWorkorderService;
|
import com.ktg.mes.pro.service.IProWorkorderService;
|
||||||
|
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||||
import com.ktg.system.strategy.AutoCodeUtil;
|
import com.ktg.system.strategy.AutoCodeUtil;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -40,6 +41,9 @@ public class ProCardController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IProCardService proCardService;
|
private IProCardService proCardService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmBarCodeUtil wmBarCodeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询工序流转卡列表
|
* 查询工序流转卡列表
|
||||||
*/
|
*/
|
||||||
@ -83,8 +87,9 @@ public class ProCardController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ProCard proCard)
|
public AjaxResult add(@RequestBody ProCard proCard)
|
||||||
{
|
{
|
||||||
|
int ret = proCardService.insertProCard(proCard);
|
||||||
return toAjax(proCardService.insertProCard(proCard));
|
wmBarCodeUtil.generateBarCode(UserConstants.BARCODE_TYPE_PROCARD,proCard.getCardId(),proCard.getCardCode(),"");
|
||||||
|
return toAjax(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,6 +60,14 @@ public class ProCardMobController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('mes:pro:procard:list')")
|
@PreAuthorize("@ss.hasPermi('mes:pro:procard:list')")
|
||||||
@GetMapping("/getStationList")
|
@GetMapping("/getStationList")
|
||||||
public AjaxResult getStationList(ProCard card){
|
public AjaxResult getStationList(ProCard card){
|
||||||
|
if(!StringUtils.isNotNull(card.getWorkorderId())){
|
||||||
|
return AjaxResult.error("请传递生产工单ID参数");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!StringUtils.isNotNull(card.getWorkstationId())){
|
||||||
|
return AjaxResult.error("请传递工作站ID参数");
|
||||||
|
}
|
||||||
|
|
||||||
List<ProCard> list = proCardService.getStationList(card);
|
List<ProCard> list = proCardService.getStationList(card);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
@ -94,11 +94,11 @@ public class WmSnController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('mes:pro:procard:list')")
|
@PreAuthorize("@ss.hasPermi('mes:pro:procard:list')")
|
||||||
@GetMapping("/getStationList")
|
@GetMapping("/getStationList")
|
||||||
public AjaxResult getStationList(WmSn sn){
|
public AjaxResult getStationList(WmSn sn){
|
||||||
if(!StringUtils.isNotNull(sn.getWorkOrderId())){
|
if(!StringUtils.isNotNull(sn.getWorkorderId())){
|
||||||
return AjaxResult.error("请指定生产工单ID");
|
return AjaxResult.error("请指定生产工单ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotNull(sn.getWorkStationId())){
|
if(StringUtils.isNotNull(sn.getWorkstationId())){
|
||||||
return AjaxResult.error("请指定工作站!");
|
return AjaxResult.error("请指定工作站!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,11 +7,13 @@ import com.ktg.common.core.controller.BaseController;
|
|||||||
import com.ktg.common.core.domain.AjaxResult;
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
import com.ktg.common.core.page.TableDataInfo;
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
import com.ktg.common.enums.BusinessType;
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.StringUtils;
|
||||||
import com.ktg.common.utils.poi.ExcelUtil;
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
import com.ktg.mes.wm.domain.WmSn;
|
import com.ktg.mes.wm.domain.WmSn;
|
||||||
import com.ktg.mes.wm.service.IWmSnService;
|
import com.ktg.mes.wm.service.IWmSnService;
|
||||||
import com.ktg.system.strategy.AutoCodeUtil;
|
import com.ktg.system.strategy.AutoCodeUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -53,6 +55,24 @@ public class WmSnMobController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据生产工单和工作站查询所有SN流转记录")
|
||||||
|
@GetMapping("/getStationList")
|
||||||
|
public AjaxResult getStationList(WmSn sn){
|
||||||
|
if(StringUtils.isNotNull(sn.getWorkorderId())){
|
||||||
|
return AjaxResult.error("请输入生产工单ID参数");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotNull(sn.getWorkstationId())){
|
||||||
|
return AjaxResult.error("请输入工作站ID参数");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<WmSn> snList = wmSnService.getStationList(sn);
|
||||||
|
return AjaxResult.success(snList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出SN码列表
|
* 导出SN码列表
|
||||||
*/
|
*/
|
||||||
|
@ -50,11 +50,11 @@ public class WmSn extends BaseEntity
|
|||||||
private String batchCode;
|
private String batchCode;
|
||||||
|
|
||||||
|
|
||||||
private Long workOrderId;
|
private Long workorderId;
|
||||||
|
|
||||||
private Date inputTime;
|
private Date inputTime;
|
||||||
|
|
||||||
private Long workStationId;
|
private Long workstationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SN码的数量
|
* SN码的数量
|
||||||
@ -203,15 +203,6 @@ public class WmSn extends BaseEntity
|
|||||||
return attr4;
|
return attr4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Long getWorkOrderId() {
|
|
||||||
return workOrderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWorkOrderId(Long workOrderId) {
|
|
||||||
this.workOrderId = workOrderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getInputTime() {
|
public Date getInputTime() {
|
||||||
return inputTime;
|
return inputTime;
|
||||||
}
|
}
|
||||||
@ -220,12 +211,20 @@ public class WmSn extends BaseEntity
|
|||||||
this.inputTime = inputTime;
|
this.inputTime = inputTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getWorkStationId() {
|
public Long getWorkorderId() {
|
||||||
return workStationId;
|
return workorderId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorkStationId(Long workStationId) {
|
public void setWorkorderId(Long workorderId) {
|
||||||
this.workStationId = workStationId;
|
this.workorderId = workorderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWorkstationId() {
|
||||||
|
return workstationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWorkstationId(Long workstationId) {
|
||||||
|
this.workstationId = workstationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,8 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from pro_card pc
|
from pro_card pc
|
||||||
left join pro_card_process pcp
|
left join pro_card_process pcp
|
||||||
on pc.card_id = pcp.card_id
|
on pc.card_id = pcp.card_id
|
||||||
where pc.workorder_id = #{workOrderId}
|
where pc.workorder_id = #{workorderId}
|
||||||
and pc.workstation_id = #{workStationId}
|
and pcp.workstation_id = #{workstationId}
|
||||||
order by pcp.input_time desc
|
order by pcp.input_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="unitOfMeasure" column="unit_of_measure" />
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
<result property="batchCode" column="batch_code" />
|
<result property="batchCode" column="batch_code" />
|
||||||
<result property="snNum" column="snNum"></result>
|
<result property="snNum" column="snNum"></result>
|
||||||
<result property="workOrderId" column="work_order_id"></result>
|
<result property="workorderId" column="workorder_id"></result>
|
||||||
<result property="inputTime" column="input_time"></result>
|
<result property="inputTime" column="input_time"></result>
|
||||||
<result property="genDate" column="gen_date"></result>
|
<result property="genDate" column="gen_date"></result>
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectWmSnVo">
|
<sql id="selectWmSnVo">
|
||||||
select sn_id, sn_code, item_id, item_code, item_name, specification, unit_of_measure, batch_code, work_order_id, gen_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_sn
|
select sn_id, sn_code, item_id, item_code, item_name, specification, unit_of_measure, batch_code, workorder_id, gen_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_sn
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWmSnList" parameterType="WmSn" resultMap="WmSnResult">
|
<select id="selectWmSnList" parameterType="WmSn" resultMap="WmSnResult">
|
||||||
@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
||||||
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||||
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
||||||
<if test="workOderId != null and workOrderId != ''"> and work_order_id = #{workOrderId}</if>
|
<if test="workoderId != null and workorderId != ''"> and workorder_id = #{workorderId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -72,8 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from wm_sn sn
|
from wm_sn sn
|
||||||
left join pro_sn_process ps
|
left join pro_sn_process ps
|
||||||
on sn.sn_id = ps.sn_id
|
on sn.sn_id = ps.sn_id
|
||||||
where sn.work_order_id =#{workOrderId}
|
where sn.workorder_id =#{workorderId}
|
||||||
and ps.workstation_id = #{workStationId}
|
and ps.workstation_id = #{workstationId}
|
||||||
order by ps.input_time desc
|
order by ps.input_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="specification != null">specification,</if>
|
<if test="specification != null">specification,</if>
|
||||||
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||||
<if test="batchCode != null">batch_code,</if>
|
<if test="batchCode != null">batch_code,</if>
|
||||||
<if test="workOderId != null">work_order_id,</if>
|
<if test="workoderId != null">workorder_id,</if>
|
||||||
<if test="genDate !=null">gen_date,</if>
|
<if test="genDate !=null">gen_date,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="attr1 != null">attr1,</if>
|
<if test="attr1 != null">attr1,</if>
|
||||||
@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="specification != null">#{specification},</if>
|
<if test="specification != null">#{specification},</if>
|
||||||
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||||
<if test="batchCode != null">#{batchCode},</if>
|
<if test="batchCode != null">#{batchCode},</if>
|
||||||
<if test="workOderId != null">#{workOrderId},</if>
|
<if test="workoderId != null">#{workorderId},</if>
|
||||||
<if test="genDate !=null">#{genDate},</if>
|
<if test="genDate !=null">#{genDate},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="attr1 != null">#{attr1},</if>
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="specification != null">specification = #{specification},</if>
|
<if test="specification != null">specification = #{specification},</if>
|
||||||
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
||||||
<if test="batchCode != null">batch_code = #{batchCode},</if>
|
<if test="batchCode != null">batch_code = #{batchCode},</if>
|
||||||
<if test="workOderId != null">work_order_id = #{workOrderId},</if>
|
<if test="workoderId != null">workorder_id = #{workorderId},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user