diff --git a/src/main/java/com/gaotao/modules/fixedCarrier/controller/FixedCarrierController.java b/src/main/java/com/gaotao/modules/fixedCarrier/controller/FixedCarrierController.java new file mode 100644 index 0000000..775f3a5 --- /dev/null +++ b/src/main/java/com/gaotao/modules/fixedCarrier/controller/FixedCarrierController.java @@ -0,0 +1,201 @@ +package com.gaotao.modules.fixedCarrier.controller; + +import com.gaotao.common.constant.SysMsgConstant; +import com.gaotao.common.utils.PageUtils; +import com.gaotao.common.utils.R; +import com.gaotao.modules.fixedCarrier.entity.FixedCarrier; +import com.gaotao.modules.fixedCarrier.service.FixedCarrierService; +import com.gaotao.modules.sys.controller.AbstractController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 固定载具管理控制器 + */ +@RestController +@RequestMapping("fixedCarrier") +public class FixedCarrierController extends AbstractController { + + @Autowired + private FixedCarrierService fixedCarrierService; + + /** + * 查询固定载具列表(带分页) + */ + @PostMapping("list") + public R list(@RequestBody Map params) { + try { + // 获取分页参数 + int page = params.get("page") != null ? Integer.parseInt(params.get("page").toString()) : 1; + int limit = params.get("limit") != null ? Integer.parseInt(params.get("limit").toString()) : 20; + + // 查询列表 + List> list = fixedCarrierService.queryList(params); + + // 查询总数 + int total = fixedCarrierService.queryTotal(params); + + // 计算分页 + int start = (page - 1) * limit; + int end = Math.min(start + limit, list.size()); + List> pageList = list.subList(start, end); + + // 封装分页数据 + PageUtils pageUtils = new PageUtils(pageList, total, limit, page); + + return R.ok() + .put("code", 0) + .put("msg", getLanguageMsg(SysMsgConstant.OBJECT_ID_200000)) + .put("page", pageUtils); + } catch (Exception e) { + logger.error("查询固定载具列表失败", e); + return R.error("查询固定载具列表失败: " + e.getMessage()); + } + } + + /** + * 根据主键查询固定载具 + */ + @PostMapping("info") + public R info(@RequestBody Map params) { + try { + String site = (String) params.get("site"); + String buNo = (String) params.get("buNo"); + String carrierNo = (String) params.get("carrierNo"); + + if (site == null || site.isEmpty()) { + return R.error("站点不能为空"); + } + if (buNo == null || buNo.isEmpty()) { + return R.error("BU不能为空"); + } + if (carrierNo == null || carrierNo.isEmpty()) { + return R.error("载具编码不能为空"); + } + + FixedCarrier fixedCarrier = fixedCarrierService.queryByPrimaryKey(site, buNo, carrierNo); + + return R.ok() + .put("code", 0) + .put("msg", getLanguageMsg(SysMsgConstant.OBJECT_ID_200000)) + .put("data", fixedCarrier); + } catch (Exception e) { + logger.error("查询固定载具详情失败", e); + return R.error("查询固定载具详情失败: " + e.getMessage()); + } + } + + /** + * 新增固定载具 + */ + @PostMapping("save") + public R save(@RequestBody FixedCarrier fixedCarrier) { + try { + // 参数校验 + if (fixedCarrier.getSite() == null || fixedCarrier.getSite().isEmpty()) { + return R.error("站点不能为空"); + } + if (fixedCarrier.getBuNo() == null || fixedCarrier.getBuNo().isEmpty()) { + return R.error("BU不能为空"); + } + if (fixedCarrier.getCarrierNo() == null || fixedCarrier.getCarrierNo().isEmpty()) { + return R.error("载具编码不能为空"); + } + if (fixedCarrier.getCarrierTypeCode() == null || fixedCarrier.getCarrierTypeCode().isEmpty()) { + return R.error("载具类型编码不能为空"); + } + if (fixedCarrier.getCarrierTypeName() == null || fixedCarrier.getCarrierTypeName().isEmpty()) { + return R.error("载具类型名称不能为空"); + } + if (fixedCarrier.getStatus() == null) { + return R.error("状态不能为空"); + } + + // 设置默认值 + if (fixedCarrier.getTotalUsageCount() == null) { + fixedCarrier.setTotalUsageCount(0); + } + + fixedCarrierService.save(fixedCarrier); + + return R.ok() + .put("code", 0) + .put("msg", getLanguageMsg(SysMsgConstant.OBJECT_ID_200001)); + } catch (Exception e) { + logger.error("新增固定载具失败", e); + return R.error("新增固定载具失败: " + e.getMessage()); + } + } + + /** + * 修改固定载具 + */ + @PostMapping("update") + public R update(@RequestBody FixedCarrier fixedCarrier) { + try { + // 参数校验 + if (fixedCarrier.getSite() == null || fixedCarrier.getSite().isEmpty()) { + return R.error("站点不能为空"); + } + if (fixedCarrier.getBuNo() == null || fixedCarrier.getBuNo().isEmpty()) { + return R.error("BU不能为空"); + } + if (fixedCarrier.getCarrierNo() == null || fixedCarrier.getCarrierNo().isEmpty()) { + return R.error("载具编码不能为空"); + } + if (fixedCarrier.getCarrierTypeCode() == null || fixedCarrier.getCarrierTypeCode().isEmpty()) { + return R.error("载具类型编码不能为空"); + } + if (fixedCarrier.getCarrierTypeName() == null || fixedCarrier.getCarrierTypeName().isEmpty()) { + return R.error("载具类型名称不能为空"); + } + if (fixedCarrier.getStatus() == null) { + return R.error("状态不能为空"); + } + + fixedCarrierService.update(fixedCarrier); + + return R.ok() + .put("code", 0) + .put("msg", getLanguageMsg(SysMsgConstant.OBJECT_ID_200002)); + } catch (Exception e) { + logger.error("修改固定载具失败", e); + return R.error("修改固定载具失败: " + e.getMessage()); + } + } + + /** + * 删除固定载具 + */ + @PostMapping("delete") + public R delete(@RequestBody Map params) { + try { + String site = (String) params.get("site"); + String buNo = (String) params.get("buNo"); + String carrierNo = (String) params.get("carrierNo"); + + if (site == null || site.isEmpty()) { + return R.error("站点不能为空"); + } + if (buNo == null || buNo.isEmpty()) { + return R.error("BU不能为空"); + } + if (carrierNo == null || carrierNo.isEmpty()) { + return R.error("载具编码不能为空"); + } + + fixedCarrierService.delete(site, buNo, carrierNo); + + return R.ok() + .put("code", 0) + .put("msg", getLanguageMsg(SysMsgConstant.OBJECT_ID_200003)); + } catch (Exception e) { + logger.error("删除固定载具失败", e); + return R.error("删除固定载具失败: " + e.getMessage()); + } + } +} + diff --git a/src/main/java/com/gaotao/modules/fixedCarrier/dao/FixedCarrierMapper.java b/src/main/java/com/gaotao/modules/fixedCarrier/dao/FixedCarrierMapper.java new file mode 100644 index 0000000..07d8f18 --- /dev/null +++ b/src/main/java/com/gaotao/modules/fixedCarrier/dao/FixedCarrierMapper.java @@ -0,0 +1,71 @@ +package com.gaotao.modules.fixedCarrier.dao; + +import com.gaotao.modules.fixedCarrier.entity.FixedCarrier; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 固定载具Mapper接口 + */ +@Mapper +public interface FixedCarrierMapper { + /** + * 查询固定载具列表 + * + * @param params 查询参数 + * @return 固定载具列表 + */ + List> queryList(Map params); + + /** + * 根据主键查询固定载具 + * + * @param site 站点 + * @param buNo BU + * @param carrierNo 载具编码 + * @return 固定载具信息 + */ + FixedCarrier queryByPrimaryKey(@Param("site") String site, + @Param("buNo") String buNo, + @Param("carrierNo") String carrierNo); + + /** + * 新增固定载具 + * + * @param fixedCarrier 固定载具信息 + * @return 影响行数 + */ + int save(FixedCarrier fixedCarrier); + + /** + * 修改固定载具 + * + * @param fixedCarrier 固定载具信息 + * @return 影响行数 + */ + int update(FixedCarrier fixedCarrier); + + /** + * 删除固定载具 + * + * @param site 站点 + * @param buNo BU + * @param carrierNo 载具编码 + * @return 影响行数 + */ + int delete(@Param("site") String site, + @Param("buNo") String buNo, + @Param("carrierNo") String carrierNo); + + /** + * 查询总记录数 + * + * @param params 查询参数 + * @return 总记录数 + */ + int queryTotal(Map params); +} + diff --git a/src/main/java/com/gaotao/modules/fixedCarrier/entity/FixedCarrier.java b/src/main/java/com/gaotao/modules/fixedCarrier/entity/FixedCarrier.java new file mode 100644 index 0000000..8c67e84 --- /dev/null +++ b/src/main/java/com/gaotao/modules/fixedCarrier/entity/FixedCarrier.java @@ -0,0 +1,267 @@ +package com.gaotao.modules.fixedCarrier.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 固定载具实体类 + * 对应数据库表:fixed_carrier + */ +public class FixedCarrier { + /** + * 站点 + */ + private String site; + + /** + * BU + */ + private String buNo; + + /** + * 载具唯一编码(如 PAL-20250001) + */ + private String carrierNo; + + /** + * 载具类型编码(如 Pallet, Bin, Rack) + */ + private String carrierTypeCode; + + /** + * 载具类型名称(如 金属托盘、塑料周转箱) + */ + private String carrierTypeName; + + /** + * 固定资产编号(用于财务对接) + */ + private String assetNo; + + /** + * 规格描述(如 1200x800x150mm) + */ + private String specification; + + /** + * 尺寸(长×宽×高,单位mm) + */ + private String dimensions; + + /** + * 最大承重(kg) + */ + private BigDecimal maxWeight; + + /** + * 预期使用次数(如500次) + */ + private Integer expectedLifeCycles; + + /** + * 预期使用寿命(天) + */ + private Integer expectedLifeDays; + + /** + * 状态:1=空闲 2=占用 3=维修 4=报废 5=外借 + */ + private Integer status; + + /** + * 当前所在位置(库位/区域/车间) + */ + private String currentLocation; + + /** + * 最后使用时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date lastUsedTime; + + /** + * 累计使用次数 + */ + private Integer totalUsageCount; + + /** + * 采购日期 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date purchaseDate; + + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createDate; + + /** + * 备注 + */ + private String remark; + + public String getSite() { + return site; + } + + public void setSite(String site) { + this.site = site; + } + + public String getBuNo() { + return buNo; + } + + public void setBuNo(String buNo) { + this.buNo = buNo; + } + + public String getCarrierNo() { + return carrierNo; + } + + public void setCarrierNo(String carrierNo) { + this.carrierNo = carrierNo; + } + + public String getCarrierTypeCode() { + return carrierTypeCode; + } + + public void setCarrierTypeCode(String carrierTypeCode) { + this.carrierTypeCode = carrierTypeCode; + } + + public String getCarrierTypeName() { + return carrierTypeName; + } + + public void setCarrierTypeName(String carrierTypeName) { + this.carrierTypeName = carrierTypeName; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getSpecification() { + return specification; + } + + public void setSpecification(String specification) { + this.specification = specification; + } + + public String getDimensions() { + return dimensions; + } + + public void setDimensions(String dimensions) { + this.dimensions = dimensions; + } + + public BigDecimal getMaxWeight() { + return maxWeight; + } + + public void setMaxWeight(BigDecimal maxWeight) { + this.maxWeight = maxWeight; + } + + public Integer getExpectedLifeCycles() { + return expectedLifeCycles; + } + + public void setExpectedLifeCycles(Integer expectedLifeCycles) { + this.expectedLifeCycles = expectedLifeCycles; + } + + public Integer getExpectedLifeDays() { + return expectedLifeDays; + } + + public void setExpectedLifeDays(Integer expectedLifeDays) { + this.expectedLifeDays = expectedLifeDays; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getCurrentLocation() { + return currentLocation; + } + + public void setCurrentLocation(String currentLocation) { + this.currentLocation = currentLocation; + } + + public Date getLastUsedTime() { + return lastUsedTime; + } + + public void setLastUsedTime(Date lastUsedTime) { + this.lastUsedTime = lastUsedTime; + } + + public Integer getTotalUsageCount() { + return totalUsageCount; + } + + public void setTotalUsageCount(Integer totalUsageCount) { + this.totalUsageCount = totalUsageCount; + } + + public Date getPurchaseDate() { + return purchaseDate; + } + + public void setPurchaseDate(Date purchaseDate) { + this.purchaseDate = purchaseDate; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} + diff --git a/src/main/java/com/gaotao/modules/fixedCarrier/service/FixedCarrierService.java b/src/main/java/com/gaotao/modules/fixedCarrier/service/FixedCarrierService.java new file mode 100644 index 0000000..e12deb0 --- /dev/null +++ b/src/main/java/com/gaotao/modules/fixedCarrier/service/FixedCarrierService.java @@ -0,0 +1,64 @@ +package com.gaotao.modules.fixedCarrier.service; + +import com.gaotao.modules.fixedCarrier.entity.FixedCarrier; + +import java.util.List; +import java.util.Map; + +/** + * 固定载具Service接口 + */ +public interface FixedCarrierService { + /** + * 查询固定载具列表 + * + * @param params 查询参数 + * @return 固定载具列表 + */ + List> queryList(Map params); + + /** + * 根据主键查询固定载具 + * + * @param site 站点 + * @param buNo BU + * @param carrierNo 载具编码 + * @return 固定载具信息 + */ + FixedCarrier queryByPrimaryKey(String site, String buNo, String carrierNo); + + /** + * 新增固定载具 + * + * @param fixedCarrier 固定载具信息 + * @return 影响行数 + */ + int save(FixedCarrier fixedCarrier); + + /** + * 修改固定载具 + * + * @param fixedCarrier 固定载具信息 + * @return 影响行数 + */ + int update(FixedCarrier fixedCarrier); + + /** + * 删除固定载具 + * + * @param site 站点 + * @param buNo BU + * @param carrierNo 载具编码 + * @return 影响行数 + */ + int delete(String site, String buNo, String carrierNo); + + /** + * 查询总记录数 + * + * @param params 查询参数 + * @return 总记录数 + */ + int queryTotal(Map params); +} + diff --git a/src/main/java/com/gaotao/modules/fixedCarrier/service/impl/FixedCarrierServiceImpl.java b/src/main/java/com/gaotao/modules/fixedCarrier/service/impl/FixedCarrierServiceImpl.java new file mode 100644 index 0000000..471807f --- /dev/null +++ b/src/main/java/com/gaotao/modules/fixedCarrier/service/impl/FixedCarrierServiceImpl.java @@ -0,0 +1,136 @@ +package com.gaotao.modules.fixedCarrier.service.impl; + +import com.gaotao.modules.fixedCarrier.dao.FixedCarrierMapper; +import com.gaotao.modules.fixedCarrier.entity.FixedCarrier; +import com.gaotao.modules.fixedCarrier.service.FixedCarrierService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Map; + +/** + * 固定载具Service实现类 + */ +@Service("fixedCarrierService") +public class FixedCarrierServiceImpl implements FixedCarrierService { + + private static final Logger logger = LoggerFactory.getLogger(FixedCarrierServiceImpl.class); + + @Autowired + private FixedCarrierMapper fixedCarrierMapper; + + @Override + public List> queryList(Map params) { + logger.info("查询固定载具列表,参数: {}", params); + try { + List> list = fixedCarrierMapper.queryList(params); + logger.info("查询固定载具列表成功,记录数: {}", list != null ? list.size() : 0); + return list; + } catch (Exception e) { + logger.error("查询固定载具列表失败,错误信息: {}", e.getMessage(), e); + throw new RuntimeException("查询固定载具列表失败: " + e.getMessage(), e); + } + } + + @Override + public FixedCarrier queryByPrimaryKey(String site, String buNo, String carrierNo) { + logger.info("根据主键查询固定载具,站点: {}, BU: {}, 载具编码: {}", site, buNo, carrierNo); + try { + FixedCarrier fixedCarrier = fixedCarrierMapper.queryByPrimaryKey(site, buNo, carrierNo); + logger.info("根据主键查询固定载具成功"); + return fixedCarrier; + } catch (Exception e) { + logger.error("根据主键查询固定载具失败,错误信息: {}", e.getMessage(), e); + throw new RuntimeException("根据主键查询固定载具失败: " + e.getMessage(), e); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int save(FixedCarrier fixedCarrier) { + logger.info("新增固定载具,载具编码: {}", fixedCarrier.getCarrierNo()); + try { + // 检查是否已存在 + FixedCarrier existCarrier = fixedCarrierMapper.queryByPrimaryKey( + fixedCarrier.getSite(), + fixedCarrier.getBuNo(), + fixedCarrier.getCarrierNo() + ); + if (existCarrier != null) { + logger.error("固定载具已存在,载具编码: {}", fixedCarrier.getCarrierNo()); + throw new RuntimeException("固定载具已存在"); + } + + int result = fixedCarrierMapper.save(fixedCarrier); + logger.info("新增固定载具成功,载具编码: {}", fixedCarrier.getCarrierNo()); + return result; + } catch (Exception e) { + logger.error("新增固定载具失败,错误信息: {}", e.getMessage(), e); + throw new RuntimeException("新增固定载具失败: " + e.getMessage(), e); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int update(FixedCarrier fixedCarrier) { + logger.info("修改固定载具,载具编码: {}", fixedCarrier.getCarrierNo()); + try { + // 检查是否存在 + FixedCarrier existCarrier = fixedCarrierMapper.queryByPrimaryKey( + fixedCarrier.getSite(), + fixedCarrier.getBuNo(), + fixedCarrier.getCarrierNo() + ); + if (existCarrier == null) { + logger.error("固定载具不存在,载具编码: {}", fixedCarrier.getCarrierNo()); + throw new RuntimeException("固定载具不存在"); + } + + int result = fixedCarrierMapper.update(fixedCarrier); + logger.info("修改固定载具成功,载具编码: {}", fixedCarrier.getCarrierNo()); + return result; + } catch (Exception e) { + logger.error("修改固定载具失败,错误信息: {}", e.getMessage(), e); + throw new RuntimeException("修改固定载具失败: " + e.getMessage(), e); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int delete(String site, String buNo, String carrierNo) { + logger.info("删除固定载具,站点: {}, BU: {}, 载具编码: {}", site, buNo, carrierNo); + try { + // 检查是否存在 + FixedCarrier existCarrier = fixedCarrierMapper.queryByPrimaryKey(site, buNo, carrierNo); + if (existCarrier == null) { + logger.error("固定载具不存在,载具编码: {}", carrierNo); + throw new RuntimeException("固定载具不存在"); + } + + int result = fixedCarrierMapper.delete(site, buNo, carrierNo); + logger.info("删除固定载具成功,载具编码: {}", carrierNo); + return result; + } catch (Exception e) { + logger.error("删除固定载具失败,错误信息: {}", e.getMessage(), e); + throw new RuntimeException("删除固定载具失败: " + e.getMessage(), e); + } + } + + @Override + public int queryTotal(Map params) { + logger.info("查询固定载具总记录数,参数: {}", params); + try { + int total = fixedCarrierMapper.queryTotal(params); + logger.info("查询固定载具总记录数成功,总数: {}", total); + return total; + } catch (Exception e) { + logger.error("查询固定载具总记录数失败,错误信息: {}", e.getMessage(), e); + throw new RuntimeException("查询固定载具总记录数失败: " + e.getMessage(), e); + } + } +} + diff --git a/src/main/java/com/gaotao/modules/pms/controller/QcController.java b/src/main/java/com/gaotao/modules/pms/controller/QcController.java index c7ea343..aea1d1d 100644 --- a/src/main/java/com/gaotao/modules/pms/controller/QcController.java +++ b/src/main/java/com/gaotao/modules/pms/controller/QcController.java @@ -1674,7 +1674,8 @@ public class QcController { //String buNo = params.get("buNo"); String orderNo = params.get("orderNo"); String resourceId = params.get("resourceId"); - int count = qcService.checkProcessInspectionPendingCount(site, orderNo, resourceId); + String seqNo = params.get("seqNo"); + int count = qcService.checkProcessInspectionPendingCount(site, orderNo, resourceId, seqNo); return R.ok().put("count", count); } diff --git a/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java b/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java index 0159a94..192ae73 100644 --- a/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java +++ b/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java @@ -466,5 +466,5 @@ public interface QcMapper { /** * 查询过程检验待检验记录数量 */ - int checkProcessInspectionPendingCount(@Param("site") String site, @Param("orderNo") String orderNo, @Param("resourceId") String resourceId); + int checkProcessInspectionPendingCount(@Param("site") String site, @Param("orderNo") String orderNo, @Param("resourceId") String resourceId, @Param("seqNo") String seqNo); } diff --git a/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java b/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java index 6e91706..ed8211e 100644 --- a/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java +++ b/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java @@ -3519,8 +3519,8 @@ public class QcServiceImpl implements QcService { * 查询过程检验待检验记录数量 */ @Override - public int checkProcessInspectionPendingCount(String site, String orderNo, String resourceId) { - return qcMapper.checkProcessInspectionPendingCount(site, orderNo, resourceId); + public int checkProcessInspectionPendingCount(String site, String orderNo, String resourceId, String seqNo) { + return qcMapper.checkProcessInspectionPendingCount(site, orderNo, resourceId, seqNo); } } diff --git a/src/main/java/com/gaotao/modules/pms/service/QcService.java b/src/main/java/com/gaotao/modules/pms/service/QcService.java index e04f331..e7536ed 100644 --- a/src/main/java/com/gaotao/modules/pms/service/QcService.java +++ b/src/main/java/com/gaotao/modules/pms/service/QcService.java @@ -264,5 +264,5 @@ public interface QcService { /** * 查询过程检验待检验记录数量 */ - int checkProcessInspectionPendingCount(String site, String orderNo, String resourceId); + int checkProcessInspectionPendingCount(String site, String orderNo, String resourceId, String seqNo); } diff --git a/src/main/resources/mapper/fixedCarrier/FixedCarrierMapper.xml b/src/main/resources/mapper/fixedCarrier/FixedCarrierMapper.xml new file mode 100644 index 0000000..bce15fd --- /dev/null +++ b/src/main/resources/mapper/fixedCarrier/FixedCarrierMapper.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO fixed_carrier ( + site, + bu_no, + carrier_no, + carrier_type_code, + carrier_type_name, + asset_no, + specification, + dimensions, + max_weight, + expected_life_cycles, + expected_life_days, + status, + current_location, + purchase_date, + create_by, + create_date, + remark + ) VALUES ( + #{site}, + #{buNo}, + #{carrierNo}, + #{carrierTypeCode}, + #{carrierTypeName}, + #{assetNo}, + #{specification}, + #{dimensions}, + #{maxWeight}, + #{expectedLifeCycles}, + #{expectedLifeDays}, + #{status}, + #{currentLocation}, + #{purchaseDate}, + #{createBy}, + GETDATE(), + #{remark} + ) + + + + + UPDATE fixed_carrier + SET + carrier_type_code = #{carrierTypeCode}, + carrier_type_name = #{carrierTypeName}, + asset_no = #{assetNo}, + specification = #{specification}, + dimensions = #{dimensions}, + max_weight = #{maxWeight}, + expected_life_cycles = #{expectedLifeCycles}, + expected_life_days = #{expectedLifeDays}, + status = #{status}, + current_location = #{currentLocation}, + purchase_date = #{purchaseDate}, + remark = #{remark} + WHERE site = #{site} + AND bu_no = #{buNo} + AND carrier_no = #{carrierNo} + + + + + DELETE FROM fixed_carrier + WHERE site = #{site} + AND bu_no = #{buNo} + AND carrier_no = #{carrierNo} + + + + + + + diff --git a/src/main/resources/mapper/pms/QcMapper.xml b/src/main/resources/mapper/pms/QcMapper.xml index 595b2a2..0f66695 100644 --- a/src/main/resources/mapper/pms/QcMapper.xml +++ b/src/main/resources/mapper/pms/QcMapper.xml @@ -3326,6 +3326,7 @@ AND order_no = #{orderNo} AND resource_id = #{resourceId} AND state IN ('未开始', '待检验') + and seq_no = #{seqNo}