逻辑删除+手持增加缓冲区接口+工艺车数

highway
zhaoxiaolin 1 year ago
parent d0c62cb2df
commit d394d2a1df

@ -5,13 +5,22 @@ import java.util.List;
public class WCSDataDTO {
private String sku;
// private String sku;
//
// private String loadNo;
//
// private List<WCSDataItemsDTO> unLoadItems;
private String loadNo;
private String stationNo;
private int qty;
private List<WCSDataItemsDTO> unLoadItems;
public int getQty() {
return qty;
}
private String stationNo;
public void setQty(int qty) {
this.qty = qty;
}
public String getStationNo() {
return stationNo;
@ -21,27 +30,27 @@ public class WCSDataDTO {
this.stationNo = stationNo;
}
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public String getLoadNo() {
return loadNo;
}
public void setLoadNo(String loadNo) {
this.loadNo = loadNo;
}
public List<WCSDataItemsDTO> getUnLoadItems() {
return unLoadItems;
}
public void setUnLoadItems(List<WCSDataItemsDTO> unLoadItems) {
this.unLoadItems = unLoadItems;
}
// public String getSku() {
// return sku;
// }
//
// public void setSku(String sku) {
// this.sku = sku;
// }
//
// public String getLoadNo() {
// return loadNo;
// }
//
// public void setLoadNo(String loadNo) {
// this.loadNo = loadNo;
// }
//
// public List<WCSDataItemsDTO> getUnLoadItems() {
// return unLoadItems;
// }
//
// public void setUnLoadItems(List<WCSDataItemsDTO> unLoadItems) {
// this.unLoadItems = unLoadItems;
// }
}

@ -66,4 +66,6 @@ public interface ProRfidProcessDetailMapper {
public String getStationType(String equipmentCode);
String getActuaEquips(ProRfidProcessDetail rfidInfo);
Integer getEquipNum(String machineCode);
}

@ -79,8 +79,10 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
*/
@Override
public WCSDTO requestDestinationStations(WCSDTO wcsdto) {
DynamicDataSourceContextHolder.push("ds_" + wcsdto.getFactory());
WCSDTO dto = new WCSDTO();//最终结果
try {
BeanUtils.copyBeanProp(dto, wcsdto);
//根据rfid跟工单绑定成型机跟工单绑定获取对应工艺。
ProRfidProcessDetail rfidInfo = proRfidProcessDetailMapper.getRfidInfo(wcsdto.getRfidNo());
@ -116,12 +118,20 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
wCSDataDTO = new WCSDataDTO();
if (StringUtils.isNotBlank(machineCode)) {
wCSDataDTO.setStationNo(machineCode);
if ("2".equals(stationType)) {
Integer qty = proRfidProcessDetailMapper.getEquipNum(machineCode);
wCSDataDTO.setQty(qty == null ? 0 : qty);
}
stationNos.add(wCSDataDTO);
}
}
dto.setStationNos(stationNos);
dto.setCode("0");
}
}catch (Exception e){
dto.setCode("1");
dto.setMessage("MES管理系统接口调用失败");
}
return dto;
}
public static void main(String args[]){

@ -1,96 +0,0 @@
package com.op.mes.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.mes.mapper.MesPrepareValidateMapper;
import com.op.mes.domain.MesPrepareValidate;
import com.op.mes.service.IMesPrepareValidateService;
/**
* Service
*
* @author Open Platform
* @date 2023-08-04
*/
@Service
public class MesPrepareValidateServiceImpl implements IMesPrepareValidateService {
@Autowired
private MesPrepareValidateMapper mesPrepareValidateMapper;
/**
*
*
* @param validateId
* @return
*/
@Override
@DS("#header.poolName")
public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId) {
return mesPrepareValidateMapper.selectMesPrepareValidateByValidateId(validateId);
}
/**
*
*
* @param mesPrepareValidate
* @return
*/
@Override
@DS("#header.poolName")
public List<MesPrepareValidate> selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate) {
return mesPrepareValidateMapper.selectMesPrepareValidateList(mesPrepareValidate);
}
/**
*
*
* @param mesPrepareValidate
* @return
*/
@Override
@DS("#header.poolName")
public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate) {
mesPrepareValidate.setCreateTime(DateUtils.getNowDate());
return mesPrepareValidateMapper.insertMesPrepareValidate(mesPrepareValidate);
}
/**
*
*
* @param mesPrepareValidate
* @return
*/
@Override
@DS("#header.poolName")
public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate) {
mesPrepareValidate.setUpdateTime(DateUtils.getNowDate());
return mesPrepareValidateMapper.updateMesPrepareValidate(mesPrepareValidate);
}
/**
*
*
* @param validateIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteMesPrepareValidateByValidateIds(String[] validateIds) {
return mesPrepareValidateMapper.deleteMesPrepareValidateByValidateIds(validateIds);
}
/**
*
*
* @param validateId
* @return
*/
@Override
public int deleteMesPrepareValidateByValidateId(String validateId) {
return mesPrepareValidateMapper.deleteMesPrepareValidateByValidateId(validateId);
}
}

@ -92,6 +92,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from pro_order_workorder
where workorder_code = #{workorderCode}
</select>
<select id="getEquipNum" resultType="java.lang.Integer">
select isvalue from base_equipment_attached
where property = 'dollyNumber'
and device_code = #{machineCode}
</select>
<insert id="insertProRfidProcessDetail" parameterType="ProRfidProcessDetail">
insert into pro_rfid_process_detail

@ -54,12 +54,21 @@ public class ProRoute extends BaseEntity
private String attr4;
private String fileList;
//每车的bp数
private Integer carNumUnit;
private List<String> idList;
private String routeVersion;
public Integer getCarNumUnit() {
return carNumUnit;
}
public void setCarNumUnit(Integer carNumUnit) {
this.carNumUnit = carNumUnit;
}
public List<String> getIdList() {
return idList;
}

@ -21,11 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="routeVersion" column="route_version" />
<result property="needCheck" column="need_check" />
<result property="carNumUnit" column="car_num_unit" />
</resultMap>
<select id="selectRouteByItemCode" resultMap="ProRouteResult">
select pr.route_code,pr.route_name
select pr.route_code,pr.route_name,pr.car_num_unit
from pro_route pr
INNER JOIN pro_route_product prp ON pr.route_id = prp.route_id
where prp.item_code = #{itemCode} and pr.enable_flag = 'Y'

@ -64,6 +64,8 @@ public class ProRoute extends BaseEntity
/** 其他 */
private String tecOther;
/**每车bp数**/
private Integer carNumUnit;
private String fileList;
private List<BaseFile> files;
@ -72,6 +74,14 @@ public class ProRoute extends BaseEntity
private String routeVersion;
public Integer getCarNumUnit() {
return carNumUnit;
}
public void setCarNumUnit(Integer carNumUnit) {
this.carNumUnit = carNumUnit;
}
public List<String> getIdList() {
return idList;
}

@ -26,12 +26,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="tecMachine" column="tec_machine" />
<result property="tecOther" column="tec_other" />
<result property="tecDepreciation" column="tec_depreciation" />
<result property="carNumUnit" column="car_num_unit" />
</resultMap>
<sql id="selectProRouteVo">
select route_id, route_code, route_name, route_desc, enable_flag, remark,
attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time,
route_version,need_check,tec_man,tec_machine,tec_other,tec_depreciation
route_version,need_check,tec_man,tec_machine,tec_other,tec_depreciation,car_num_unit
from pro_route
</sql>
@ -63,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="checkRouteCodeUnique" parameterType="ProRoute" resultMap="ProRouteResult">
select top 1 route_id, route_code, route_name, route_desc,
enable_flag, remark, attr1, attr2, attr3, attr4,
create_by, create_time, update_by, update_time,need_check,tec_man,tec_machine,tec_other,tec_depreciation
create_by, create_time, update_by, update_time,need_check,tec_man,tec_machine,tec_other,tec_depreciation,
car_num_unit
from pro_route
where route_code = #{routeCode}
</select>
@ -98,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tecMachine != null">tec_machine,</if>
<if test="tecOther != null">tec_other,</if>
<if test="tecDepreciation != null">tec_depreciation,</if>
<if test="carNumUnit != null">car_num_unit,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="routeId != null and routeId != ''">#{routeId},</if>
@ -121,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tecMachine != null">#{tecMachine},</if>
<if test="tecOther != null">#{tecOther},</if>
<if test="tecDepreciation != null">#{tecDepreciation},</if>
<if test="carNumUnit != null">#{carNumUnit},</if>
</trim>
</insert>
@ -147,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tecMachine != null">tec_machine = #{tecMachine},</if>
<if test="tecOther != null">tec_other = #{tecOther},</if>
<if test="tecDepreciation != null">tec_depreciation=#{tecDepreciation},</if>
<if test="carNumUnit != null">car_num_unit= #{carNumUnit},</if>
</trim>
where route_id = #{routeId}
</update>

Loading…
Cancel
Save