5 changed files with 634 additions and 0 deletions
-
193src/main/java/com/gaotao/modules/autoWareHourceHaian/controller/HaiAnSearchIssureNotifyController.java
-
32src/main/java/com/gaotao/modules/autoWareHourceHaian/mapper/HaiAnSearchIssureNotifyMapper.java
-
114src/main/java/com/gaotao/modules/autoWareHourceHaian/service/HaiAnSearchIssureNotifyService.java
-
256src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnSearchIssureNotifyServiceImpl.java
-
39src/main/resources/mapper/autoWareHourceHaian/HaiAnSearchIssureNotifyMapper.xml
@ -0,0 +1,193 @@ |
|||||
|
package com.gaotao.modules.autoWareHourceHaian.controller; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.common.utils.R; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyHeaderData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderListData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListDetail; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.service.HaiAnSearchIssureNotifyService; |
||||
|
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
||||
|
import com.gaotao.modules.notify.entity.InventoryCheckResult; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安查看领料申请单控制器,复用原查看页语义并路由到海安新表链路 - rqrq |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("autoWareHourceHaian/haiAnSearchIssureNotify") |
||||
|
public class HaiAnSearchIssureNotifyController { |
||||
|
|
||||
|
@Autowired |
||||
|
private HaiAnSearchIssureNotifyService haiAnSearchIssureNotifyService; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 分页查询海安申请单主表,返回page结构供查看页主列表渲染 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchNotifyHeaderNew") |
||||
|
public R haiAnSearchNotifyHeaderNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
PageUtils page = haiAnSearchIssureNotifyService.haiAnSearchNotifyHeaderNew(data); |
||||
|
return R.ok().put("page", page); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安申请单明细页签,返回rows供页签联动展示 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchNotifyOrderListNew") |
||||
|
public R haiAnSearchNotifyOrderListNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<HaiAnSOIssueNotifyOrderListData> rows = haiAnSearchIssureNotifyService.haiAnSearchNotifyOrderListNew(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安材料明细页签,返回rows并保留subsite维度信息 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchNotifyMaterialListNew") |
||||
|
public R haiAnSearchNotifyMaterialListNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListData> rows = haiAnSearchIssureNotifyService.haiAnSearchNotifyMaterialListNew(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安材料汇总页签,返回聚合结果供查看页汇总展示 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchSumNotifyMaterialListNew") |
||||
|
public R haiAnSearchSumNotifyMaterialListNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListData> rows = haiAnSearchIssureNotifyService.haiAnSearchSumNotifyMaterialListNew(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安预留标签清单页签,返回标签及任务追踪字段用于核对 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchMaterialListDetail") |
||||
|
public R haiAnSearchMaterialListDetail(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListDetail> rows = haiAnSearchIssureNotifyService.haiAnSearchMaterialListDetail(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安日志页签,当前延续占位结果保持前端兼容 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchNotifyLogNew") |
||||
|
public R haiAnSearchNotifyLogNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<Object> rows = haiAnSearchIssureNotifyService.haiAnSearchNotifyLogNew(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安关闭日志页签,当前延续占位结果保持前端兼容 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/searchNotifyLogCloseNew") |
||||
|
public R haiAnSearchNotifyLogCloseNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<Object> rows = haiAnSearchIssureNotifyService.haiAnSearchNotifyLogCloseNew(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安申请单状态(关闭/开启),仅写海安主单状态字段 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/updateNotifyStatusNew") |
||||
|
public R haiAnUpdateNotifyStatusNew(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
haiAnSearchIssureNotifyService.haiAnUpdateNotifyStatusNew(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 检查用户是否存在未下达海安shoporder,供取消下达前置校验 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/checkUserHasUnissueShopOrder") |
||||
|
public R haiAnCheckUserHasUnissueShopOrder(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
HaiAnSOIssueNotifyHeaderData row = haiAnSearchIssureNotifyService.haiAnCheckUserHasUnissueShopOrder(data); |
||||
|
return R.ok().put("row", row); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 取消下达海安申请单,仅允许未推送主单执行 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/cancelIssueNotify") |
||||
|
public R haiAnCancelIssueNotify(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
haiAnSearchIssureNotifyService.haiAnCancelIssueNotify(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 删除海安申请单明细行增强接口,校验通过后同步清理子表 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/deleteNotifySOSPlus") |
||||
|
public R haiAnDeleteNotifySOSPlus(@RequestBody HaiAnSOIssueNotifyOrderListData data) { |
||||
|
haiAnSearchIssureNotifyService.haiAnDeleteNotifySOSPlus(data); |
||||
|
return R.ok("删除成功"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安材料明细申请数量,保持未推送状态才能编辑 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/updateMaterialDetail") |
||||
|
public R haiAnUpdateMaterialDetail(@RequestBody HaiAnSOIssueNotifyOrderMaterialListData data) { |
||||
|
int rows = haiAnSearchIssureNotifyService.haiAnUpdateMaterialDetail(data); |
||||
|
if (rows > 0) { |
||||
|
return R.ok(); |
||||
|
} |
||||
|
return R.error("修改失败"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安BOM明细并回显已保存申请数量,供查看页编辑弹窗使用 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/getSOSBOMForIssureNew") |
||||
|
public R haiAnGetSOSBOMForIssureNew(@RequestBody SOScheduledRoutingData data) throws Exception { |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListData> rows = haiAnSearchIssureNotifyService.haiAnGetSOSBOMForIssureNew(data); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 保存海安材料明细,走先删后存逻辑确保编辑幂等 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/saveMaterialDetail") |
||||
|
public R haiAnSaveMaterialDetail(@RequestBody List<HaiAnSOIssueNotifyOrderMaterialListData> data) { |
||||
|
haiAnSearchIssureNotifyService.haiAnSaveMaterialDetail(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安库存预览占位接口,仅返回空列表与待开发提示,避免误触发业务副作用 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/checkIssueNotifyInventory") |
||||
|
public R haiAnCheckIssueNotifyInventory(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
List<InventoryCheckResult> rows = haiAnSearchIssureNotifyService.haiAnCheckIssueNotifyInventory(data); |
||||
|
return R.ok("海安库存预览待开发").put("rows", rows).put("placeholder", true); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安推送WCS占位接口,当前仅保留扩展入口不执行实际推送 - rqrq |
||||
|
*/ |
||||
|
@PostMapping(value = "/pushInventoryToWcs") |
||||
|
public R haiAnPushInventoryToWcs(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
||||
|
haiAnSearchIssureNotifyService.haiAnPushInventoryToWcs(data); |
||||
|
return R.ok("海安推送WCS待开发").put("placeholder", true); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.gaotao.modules.autoWareHourceHaian.mapper; |
||||
|
|
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyHeaderData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListData; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安查看领料申请单专用Mapper,负责非WCS操作的海安表读写 - rqrq |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface HaiAnSearchIssureNotifyMapper { |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 根据site+notifyNo查询海安主单状态,用于取消下达和编辑前置校验 - rqrq |
||||
|
*/ |
||||
|
HaiAnSOIssueNotifyHeaderData haiAnGetNotifyHeader(@Param("site") String site, @Param("notifyNo") String notifyNo); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 取消下达时将海安主单状态回写为UNISSUE,仅影响海安主表 - rqrq |
||||
|
*/ |
||||
|
int haiAnCancelIssueNotify(@Param("site") String site, @Param("notifyNo") String notifyNo); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安材料明细申请数量,支持subsite维度限定避免跨子站点误改 - rqrq |
||||
|
*/ |
||||
|
int haiAnUpdateMaterialDetail(HaiAnSOIssueNotifyOrderMaterialListData data); |
||||
|
} |
||||
@ -0,0 +1,114 @@ |
|||||
|
package com.gaotao.modules.autoWareHourceHaian.service; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyHeaderData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderListData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListDetail; |
||||
|
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
||||
|
import com.gaotao.modules.notify.entity.InventoryCheckResult; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安查看领料申请单服务,复用海安新表链路并补齐查看页非WCS操作 - rqrq |
||||
|
*/ |
||||
|
public interface HaiAnSearchIssureNotifyService { |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 分页查询海安申请单主表,查询条件必须包含site来源 - rqrq |
||||
|
*/ |
||||
|
PageUtils haiAnSearchNotifyHeaderNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安申请单明细页签,返回工单层数据用于行联动 - rqrq |
||||
|
*/ |
||||
|
List<HaiAnSOIssueNotifyOrderListData> haiAnSearchNotifyOrderListNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安材料明细页签,支持按subsite维度过滤 - rqrq |
||||
|
*/ |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListData> haiAnSearchNotifyMaterialListNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安材料汇总页签,输出聚合数量用于查看场景核对 - rqrq |
||||
|
*/ |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListData> haiAnSearchSumNotifyMaterialListNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安预留标签清单页签,输出标签与任务追踪字段 - rqrq |
||||
|
*/ |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListDetail> haiAnSearchMaterialListDetail(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安日志页签数据,当前延续占位返回保持页面兼容 - rqrq |
||||
|
*/ |
||||
|
List<Object> haiAnSearchNotifyLogNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安关闭日志页签数据,当前延续占位返回保持页面兼容 - rqrq |
||||
|
*/ |
||||
|
List<Object> haiAnSearchNotifyLogCloseNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安申请单状态(关闭/开启),严格按海安主表执行 - rqrq |
||||
|
*/ |
||||
|
void haiAnUpdateNotifyStatusNew(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 检查用户是否存在未下达海安shoporder,避免取消下达时状态冲突 - rqrq |
||||
|
*/ |
||||
|
HaiAnSOIssueNotifyHeaderData haiAnCheckUserHasUnissueShopOrder(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 取消下达海安申请单,仅允许未推送WCS状态执行 - rqrq |
||||
|
*/ |
||||
|
void haiAnCancelIssueNotify(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 删除海安工单行(增强校验版),仅允许主单未推送状态删除 - rqrq |
||||
|
*/ |
||||
|
void haiAnDeleteNotifySOSPlus(HaiAnSOIssueNotifyOrderListData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安材料申请数量,仅允许主单未推送状态修改 - rqrq |
||||
|
*/ |
||||
|
int haiAnUpdateMaterialDetail(HaiAnSOIssueNotifyOrderMaterialListData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安BOM明细并回显已保存申请数量,供查看页编辑弹窗使用 - rqrq |
||||
|
*/ |
||||
|
List<HaiAnSOIssueNotifyOrderMaterialListData> haiAnGetSOSBOMForIssureNew(SOScheduledRoutingData data) throws Exception; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 保存海安材料明细,按先删后存策略保持编辑幂等 - rqrq |
||||
|
*/ |
||||
|
void haiAnSaveMaterialDetail(List<HaiAnSOIssueNotifyOrderMaterialListData> data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安库存预览占位接口,当前仅返回空结果与待开发提示 - rqrq |
||||
|
*/ |
||||
|
List<InventoryCheckResult> haiAnCheckIssueNotifyInventory(HaiAnSOIssueNotifyHeaderData data); |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安推送WCS占位接口,当前仅保留扩展点且不产生业务副作用 - rqrq |
||||
|
*/ |
||||
|
void haiAnPushInventoryToWcs(HaiAnSOIssueNotifyHeaderData data); |
||||
|
} |
||||
@ -0,0 +1,256 @@ |
|||||
|
package com.gaotao.modules.autoWareHourceHaian.service.impl; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyHeaderData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderListData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListData; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyOrderMaterialListDetail; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.mapper.HaiAnIssureNotifyMapper; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.mapper.HaiAnSearchIssureNotifyMapper; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.service.HaiAnIssureNotifyService; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.service.HaiAnNewIssureService; |
||||
|
import com.gaotao.modules.autoWareHourceHaian.service.HaiAnSearchIssureNotifyService; |
||||
|
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
||||
|
import com.gaotao.modules.notify.entity.InventoryCheckResult; |
||||
|
import org.apache.commons.lang.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安查看领料申请单服务实现,复用海安既有查询并补齐查看页缺失操作 - rqrq |
||||
|
*/ |
||||
|
@Service |
||||
|
public class HaiAnSearchIssureNotifyServiceImpl implements HaiAnSearchIssureNotifyService { |
||||
|
|
||||
|
@Autowired |
||||
|
private HaiAnNewIssureService haiAnNewIssureService; |
||||
|
|
||||
|
@Autowired |
||||
|
private HaiAnIssureNotifyService haiAnIssureNotifyService; |
||||
|
|
||||
|
@Autowired |
||||
|
private HaiAnSearchIssureNotifyMapper haiAnSearchIssureNotifyMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private HaiAnIssureNotifyMapper haiAnIssureNotifyMapper; |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 分页查询海安申请单主表,直接复用海安新领料查询能力保持结果一致 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageUtils haiAnSearchNotifyHeaderNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchNotifyHeaderNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安申请单明细页签,复用海安明细查询避免重复SQL维护 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<HaiAnSOIssueNotifyOrderListData> haiAnSearchNotifyOrderListNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchNotifyOrderListNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安材料明细页签,保留subsite过滤与立库标识查询语义 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<HaiAnSOIssueNotifyOrderMaterialListData> haiAnSearchNotifyMaterialListNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchNotifyMaterialListNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安材料汇总页签,复用海安汇总逻辑保证统计口径一致 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<HaiAnSOIssueNotifyOrderMaterialListData> haiAnSearchSumNotifyMaterialListNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchSumNotifyMaterialListNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安预留标签页签,输出subsite及追踪字段供查看页展示 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<HaiAnSOIssueNotifyOrderMaterialListDetail> haiAnSearchMaterialListDetail(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchMaterialListDetail(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安日志页签占位数据,保持页面行为与旧页签兼容 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<Object> haiAnSearchNotifyLogNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchNotifyLogNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安关闭日志页签占位数据,保持页面行为与旧页签兼容 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<Object> haiAnSearchNotifyLogCloseNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnNewIssureService.haiAnSearchNotifyLogCloseNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安申请单状态(关闭/开启),仅写海安主表不触发旧模块逻辑 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void haiAnUpdateNotifyStatusNew(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
validateNotifyNo(data.getNotifyNo()); |
||||
|
haiAnNewIssureService.haiAnUpdateNotifyStatusNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 检查用户未下达海安单据,复用海安主流程校验口径 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public HaiAnSOIssueNotifyHeaderData haiAnCheckUserHasUnissueShopOrder(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
return haiAnIssureNotifyService.haiAnCheckUserHasUnissueShopOrder(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 取消下达海安申请单,限定主单未推送状态执行防止流程冲突 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void haiAnCancelIssueNotify(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
validateNotifyNo(data.getNotifyNo()); |
||||
|
HaiAnSOIssueNotifyHeaderData notifyHeader = haiAnSearchIssureNotifyMapper.haiAnGetNotifyHeader(data.getSite(), data.getNotifyNo()); |
||||
|
if (notifyHeader == null) { |
||||
|
throw new RuntimeException("申请单不存在"); |
||||
|
} |
||||
|
if (!"未推送".equals(notifyHeader.getPushWcsFlag())) { |
||||
|
throw new RuntimeException("申请单已推送WCS,不允许取消下达"); |
||||
|
} |
||||
|
haiAnSearchIssureNotifyMapper.haiAnCancelIssueNotify(data.getSite(), data.getNotifyNo()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 删除海安工单行增强校验,确保仅未推送主单允许删除并同步清理子表 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void haiAnDeleteNotifySOSPlus(HaiAnSOIssueNotifyOrderListData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
validateNotifyNo(data.getNotifyNo()); |
||||
|
HaiAnSOIssueNotifyHeaderData notifyHeader = haiAnSearchIssureNotifyMapper.haiAnGetNotifyHeader(data.getSite(), data.getNotifyNo()); |
||||
|
if (notifyHeader == null) { |
||||
|
throw new RuntimeException("申请单不存在"); |
||||
|
} |
||||
|
if (!"未推送".equals(notifyHeader.getPushWcsFlag())) { |
||||
|
throw new RuntimeException("当前行不是未推送状态,不能删除!"); |
||||
|
} |
||||
|
haiAnIssureNotifyMapper.haiAnDeleteNotifySOS(data); |
||||
|
HaiAnSOIssueNotifyOrderMaterialListData deleteData = new HaiAnSOIssueNotifyOrderMaterialListData(); |
||||
|
deleteData.setNotifyNo(data.getNotifyNo()); |
||||
|
deleteData.setSite(data.getSite()); |
||||
|
deleteData.setSubSite(data.getSubSite()); |
||||
|
deleteData.setItemNo(data.getItemNo()); |
||||
|
haiAnIssureNotifyMapper.haiAnDeleteSOIssueNotifyOrderMaterialListData(deleteData); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 更新海安材料申请数量增强校验,防止已推送单据被编辑 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public int haiAnUpdateMaterialDetail(HaiAnSOIssueNotifyOrderMaterialListData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
validateNotifyNo(data.getNotifyNo()); |
||||
|
HaiAnSOIssueNotifyHeaderData notifyHeader = haiAnSearchIssureNotifyMapper.haiAnGetNotifyHeader(data.getSite(), data.getNotifyNo()); |
||||
|
if (notifyHeader == null) { |
||||
|
throw new RuntimeException("申请单不存在"); |
||||
|
} |
||||
|
if (!"未推送".equals(notifyHeader.getPushWcsFlag())) { |
||||
|
throw new RuntimeException("申请单已推送WCS,不允许修改"); |
||||
|
} |
||||
|
int rows = haiAnSearchIssureNotifyMapper.haiAnUpdateMaterialDetail(data); |
||||
|
if (rows <= 0) { |
||||
|
throw new RuntimeException("未找到可更新的材料明细"); |
||||
|
} |
||||
|
return rows; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 查询海安BOM明细并回显已保存数据,供查看页编辑弹窗回填 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<HaiAnSOIssueNotifyOrderMaterialListData> haiAnGetSOSBOMForIssureNew(SOScheduledRoutingData data) throws Exception { |
||||
|
if (StringUtils.isBlank(data.getSite())) { |
||||
|
throw new RuntimeException("请求缺少site,无法查询海安BOM明细"); |
||||
|
} |
||||
|
return haiAnNewIssureService.haiAnGetSOSBOMForIssureNew(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 保存海安材料明细,复用海安先删后存逻辑确保编辑幂等 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void haiAnSaveMaterialDetail(List<HaiAnSOIssueNotifyOrderMaterialListData> data) { |
||||
|
haiAnIssureNotifyService.haiAnSaveMaterialDetail(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安库存预览占位实现,仅返回空列表和提示,不触发任何WCS相关写操作 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<InventoryCheckResult> haiAnCheckIssueNotifyInventory(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
validateNotifyNo(data.getNotifyNo()); |
||||
|
return new ArrayList<>(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @author rqrq |
||||
|
* @Description 海安推送WCS占位实现,保留扩展点且不写任务表不改推送状态 - rqrq |
||||
|
*/ |
||||
|
@Override |
||||
|
public void haiAnPushInventoryToWcs(HaiAnSOIssueNotifyHeaderData data) { |
||||
|
validateSite(data.getSite()); |
||||
|
validateNotifyNo(data.getNotifyNo()); |
||||
|
// TODO 后续在该入口接入海安专属库存预览推送逻辑,本次仅保留占位不执行任何副作用 - rqrq |
||||
|
} |
||||
|
|
||||
|
private void validateSite(String site) { |
||||
|
if (StringUtils.isBlank(site)) { |
||||
|
throw new RuntimeException("请求缺少site,无法执行海安查看业务"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private void validateNotifyNo(String notifyNo) { |
||||
|
if (StringUtils.isBlank(notifyNo)) { |
||||
|
throw new RuntimeException("请求缺少notifyNo,无法执行海安查看业务"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
<?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.gaotao.modules.autoWareHourceHaian.mapper.HaiAnSearchIssureNotifyMapper"> |
||||
|
|
||||
|
<!-- 查询海安主单状态,作为取消下达和修改明细的前置校验数据源 - rqrq --> |
||||
|
<select id="haiAnGetNotifyHeader" resultType="com.gaotao.modules.autoWareHourceHaian.entity.HaiAnSOIssueNotifyHeaderData"> |
||||
|
SELECT TOP 1 |
||||
|
notify_no AS notifyNo, |
||||
|
site, |
||||
|
status, |
||||
|
push_wcs_flag AS pushWcsFlag, |
||||
|
username |
||||
|
FROM haian_SOIssueNotifyHeader WITH (NOLOCK) |
||||
|
WHERE site = #{site} |
||||
|
AND notify_no = #{notifyNo} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 取消下达仅回写海安主单状态,避免影响旧流程主表 - rqrq --> |
||||
|
<update id="haiAnCancelIssueNotify"> |
||||
|
UPDATE haian_SOIssueNotifyHeader |
||||
|
SET status = 'UNISSUE' |
||||
|
WHERE site = #{site} |
||||
|
AND notify_no = #{notifyNo} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 更新海安材料申请数量,支持subsite条件避免跨子站点误修改 - rqrq --> |
||||
|
<update id="haiAnUpdateMaterialDetail"> |
||||
|
UPDATE haian_SOIssueNotifyOrderMaterialList |
||||
|
SET qty_to_issue = #{qtyToIssue} |
||||
|
WHERE notify_no = #{notifyNo} |
||||
|
AND site = #{site} |
||||
|
AND item_no = #{itemNo} |
||||
|
AND BOM_item_no = #{bOMItemNo} |
||||
|
<if test="subSite != null and subSite != ''"> |
||||
|
AND sub_site = #{subSite} |
||||
|
</if> |
||||
|
</update> |
||||
|
|
||||
|
</mapper> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue