You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
452 lines
15 KiB
452 lines
15 KiB
package com.gaotao.modules.notify.controller;
|
|
|
|
|
|
import com.gaotao.common.utils.PageUtils;
|
|
import com.gaotao.common.utils.R;
|
|
import com.gaotao.modules.base.entity.SOScheduledRoutingData;
|
|
import com.gaotao.modules.customer.entity.dto.ShipmentIssueDto;
|
|
import com.gaotao.modules.notify.entity.*;
|
|
import com.gaotao.modules.notify.entity.dto.NewSoIssueNotifyDto;
|
|
import com.gaotao.modules.notify.entity.dto.NoOrderNotifyDto;
|
|
import com.gaotao.modules.notify.entity.vo.*;
|
|
import com.gaotao.modules.notify.service.IssureNotifyService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import java.text.ParseException;
|
|
import java.util.List;
|
|
|
|
@RestController
|
|
@RequestMapping("orderIssure/issureNotify")
|
|
public class IssureNotifyController {
|
|
|
|
@Autowired
|
|
private IssureNotifyService issureNotifyService;
|
|
|
|
/**
|
|
* @Description 获取用户下面未下达领料申请单
|
|
* @Title getUserNotifyNo
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/8/30 14:36
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/getUserNotifyNo")
|
|
@ResponseBody
|
|
public R getUserNotifyNo(@RequestBody SOIssueNotifyHeaderData data) {
|
|
SOIssueNotifyHeaderData row = issureNotifyService.getUserNotifyNo(data);
|
|
return R.ok().put("row", row);
|
|
}
|
|
|
|
|
|
@PostMapping(value="/createNotify")
|
|
@ResponseBody
|
|
public R createNotify(@RequestBody SOIssueNotifyHeaderData data) throws ParseException {
|
|
issureNotifyService.createNotify(data);
|
|
return R.ok();
|
|
}
|
|
|
|
@PostMapping(value="/updateNotifyBu")
|
|
@ResponseBody
|
|
public R updateNotifyBu(@RequestBody SOIssueNotifyHeaderData data) {
|
|
issureNotifyService.updateNotifyBu(data);
|
|
return R.ok();
|
|
}
|
|
|
|
/**
|
|
* @Description 查询子订单
|
|
* @Title getNotifyNoDetail
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/9/1 19:01
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/getNotifyNoDetail")
|
|
@ResponseBody
|
|
public R getNotifyNoDetail(@RequestBody SOIssueNotifyHeaderData data) {
|
|
List<SOIssueNotifyOrderListData> rows = issureNotifyService.getNotifyNoDetail(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
/**
|
|
* @Title getSOScheduledRoutingListForIssure
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/9/2 9:33
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/getSOScheduledRoutingListForIssure")
|
|
@ResponseBody
|
|
public R getSOScheduledRoutingListForIssure(@RequestBody SOScheduledRoutingData data) throws Exception{
|
|
//TODO 调用rifs接口获取列表数据
|
|
List<SOScheduledRoutingData> rows = issureNotifyService.getSOScheduledRoutingListForIssure(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
/**
|
|
* 获取ifs
|
|
*/
|
|
@PostMapping(value="/getIFSShopOrderByOrderNo")
|
|
@ResponseBody
|
|
public R getIFSShopOrderByOrderNo(@RequestBody SOScheduledRoutingData data) throws Exception{
|
|
//TODO 调用rifs接口获取shoporder
|
|
List<ShopOrderVo> shopOrderVo = issureNotifyService.getIFSShopOrderByOrderNo(data);
|
|
return R.ok().put("shopOrderVo", shopOrderVo);
|
|
}
|
|
|
|
@PostMapping(value="/getSOSBOMForIssure")
|
|
@ResponseBody
|
|
public R getSOSBOMForIssure(@RequestBody SOScheduledRoutingData data) throws Exception{
|
|
List<ShopOrderMaterialVo> rows = issureNotifyService.getSOSBOMForIssure(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
/**
|
|
* @Description 查看其他已申请物料
|
|
* @Title searchOtherPart
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/10/28 9:49
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/searchOtherPart")
|
|
@ResponseBody
|
|
public R searchOtherPart(@RequestBody SOIssueNotifyOrderMaterialListData data) {
|
|
List<SOIssueNotifyOrderMaterialListData> rows = issureNotifyService.searchOtherPart(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
/**
|
|
* @Description 保存申请单派工单记录
|
|
* @Title saveSOIssueNotifyOrderList
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/9/2 16:06
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/saveSOIssueNotifyOrderList")
|
|
@ResponseBody
|
|
public R saveSOIssueNotifyOrderList(@RequestBody SOIssueNotifyOrderList data) {
|
|
Integer itemNo= issureNotifyService.saveSOIssueNotifyOrderList(data);
|
|
return R.ok().put("itemNo",itemNo);
|
|
}
|
|
|
|
/**
|
|
* @Description TODO
|
|
* @Title saveMaterialDetail
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/9/2 17:05
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/saveMaterialDetail")
|
|
@ResponseBody
|
|
public R saveMaterialDetail(@RequestBody List<SOIssueNotifyOrderMaterialListData> data) {
|
|
issureNotifyService.saveMaterialDetail(data);
|
|
return R.ok();
|
|
}
|
|
|
|
@PostMapping(value="/updateMaterialDetail")
|
|
@ResponseBody
|
|
public R updateMaterialDetail(@RequestBody SOIssueNotifyOrderMaterialList data) {
|
|
int i = issureNotifyService.updateMaterialDetail(data);
|
|
if(i >0){
|
|
return R.ok();
|
|
}
|
|
return R.error("修改失败");
|
|
}
|
|
|
|
/**
|
|
* @Description TODO
|
|
* @Title deleteNotifySOS
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/9/3 9:09
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/deleteNotifySOS")
|
|
@ResponseBody
|
|
public R deleteNotifySOS(@RequestBody SOIssueNotifyOrderListData data) {
|
|
issureNotifyService.deleteNotifySOS(data);
|
|
return R.ok();
|
|
}
|
|
|
|
|
|
@PostMapping(value="/xiadaNotify")
|
|
@ResponseBody
|
|
public R xiadaNotifyHeader(@RequestBody SOIssueNotifyHeaderData data) {
|
|
issureNotifyService.xiadaNotifyHeader(data);
|
|
return R.ok();
|
|
}
|
|
|
|
|
|
@PostMapping(value="/deleteNotify")
|
|
@ResponseBody
|
|
public R deleteNotifyHeader(@RequestBody SOIssueNotifyHeaderData data) {
|
|
issureNotifyService.deleteNotifyHeader(data);
|
|
return R.ok("删除成功");
|
|
}
|
|
|
|
|
|
@PostMapping(value="/searchNotifyHeader")
|
|
@ResponseBody
|
|
public R searchNotifyHeader(@RequestBody SOIssueNotifyHeaderData data) {
|
|
PageUtils page = issureNotifyService.searchNotifyHeader(data);
|
|
return R.ok().put("page", page);
|
|
}
|
|
|
|
|
|
@PostMapping(value="/searchNotifyOrderList")
|
|
@ResponseBody
|
|
public R searchNotifyOrderList(@RequestBody SOIssueNotifyHeaderData data) {
|
|
List<SOIssueNotifyOrderListData> rows = issureNotifyService.searchNotifyOrderList(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
@PostMapping(value="/searchNotifyMaterialList")
|
|
@ResponseBody
|
|
public R searchNotifyMaterialList(@RequestBody SOIssueNotifyHeaderData data) {
|
|
List<SOIssueNotifyOrderMaterialListData> rows = issureNotifyService.searchNotifyMaterialList(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
@PostMapping(value="/searchSumNotifyMaterialList")
|
|
@ResponseBody
|
|
public R searchSumNotifyMaterialList(@RequestBody SOIssueNotifyHeaderData data) {
|
|
List<SOIssueNotifyOrderMaterialListData> rows = issureNotifyService.searchSumNotifyMaterialList(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
/*
|
|
* @Description 非BOM物料
|
|
* @Title getNoControlPartList
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/10/28 9:36
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
/*@PostMapping(value="/getPartList")
|
|
@ResponseBody
|
|
public R getPartList(@RequestBody PartData data) {
|
|
List<PartData> rows = issureNotifyService.getPartList(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
@PostMapping(value="/getNoControlPartList")
|
|
@ResponseBody
|
|
public R getNoControlPartList(@RequestBody PartData data) {
|
|
List<PartData> rows = issureNotifyService.getNoControlPartList(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
@PostMapping(value="/searchNotifyLog")
|
|
@ResponseBody
|
|
public R searchNotifyLog(@RequestBody IssueNotifyChangeLog data) {
|
|
List<IssueNotifyChangeLog> rows = issureNotifyService.searchIssueNotifyChangeLog(data);
|
|
return R.ok().put("rows", rows);
|
|
}*/
|
|
|
|
@PostMapping(value = "/checkPartStock")
|
|
@ResponseBody
|
|
public R checkPartStock(@RequestBody SOIssueNotifyHeaderData data){
|
|
List<SOIssueNotifyOrderMaterialListData> rows = issureNotifyService.checkPartStock(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
@PostMapping(value="/deleteNotifySOSPlus")
|
|
@ResponseBody
|
|
public R deleteNotifySOSPlus(@RequestBody SOIssueNotifyOrderListData data) {
|
|
//issureNotifyService.deleteNotifySOSPlus(data);
|
|
return R.ok();
|
|
}
|
|
@PostMapping(value="/updateNotifyStatus")
|
|
@ResponseBody
|
|
public R updateNotifyStatus(@RequestBody SOIssueNotifyHeaderData data) {
|
|
issureNotifyService.updateNotifyStatus(data);
|
|
return R.ok();
|
|
}
|
|
|
|
@PostMapping(value="/deleteNotifyMaterial")
|
|
@ResponseBody
|
|
public R deleteNotifyMaterial(@RequestBody SOIssueNotifyOrderMaterialListData data) {
|
|
//issureNotifyService.deleteNotifyMaterial(data);
|
|
return R.ok();
|
|
}
|
|
@PostMapping(value="/deleteNotifyMaterialWithOutLog")
|
|
@ResponseBody
|
|
public R deleteNotifyMaterialWithOutLog(@RequestBody SOIssueNotifyOrderMaterialListData data) {
|
|
//issureNotifyService.deleteNotifyMaterialWithOutLog(data);
|
|
return R.ok();
|
|
}
|
|
/**
|
|
* @Description 保存非bom和管控物料
|
|
* @Title saveOtherPart
|
|
* @param data
|
|
* @author rq
|
|
* @date 2024/10/25 17:52
|
|
* @return R
|
|
* @throw
|
|
*/
|
|
@PostMapping(value="/saveOtherPart")
|
|
@ResponseBody
|
|
public R saveOtherPart(@RequestBody SOIssueNotifyOrderMaterialListData data) {
|
|
//issureNotifyService.saveOtherPart(data);
|
|
return R.ok();
|
|
}
|
|
|
|
/*@PostMapping(value="/searchNotifyLogClose")
|
|
@ResponseBody
|
|
public R searchNotifyLogClose(@RequestBody SOIssueNotifyLogData data) {
|
|
List<SOIssueNotifyLogData> rows = issureNotifyService.searchNotifyLogClose(data);
|
|
return R.ok().put("rows", rows);
|
|
}*/
|
|
|
|
@PostMapping(value="/updateNotifyConfirmStatus")
|
|
@ResponseBody
|
|
public R updateNotifyConfirmStatus(@RequestBody SOIssueNotifyHeaderData data) throws Exception{
|
|
/*Boolean flag = issureNotifyService.updateNotifyConfirmStatus(data);
|
|
if(flag){
|
|
return R.ok();
|
|
}*/
|
|
return R.error();
|
|
}
|
|
|
|
@PostMapping(value="/updateNotifyBatchConfirmStatus")
|
|
public R updateNotifyBatchConfirmStatus(@RequestBody String[] notifyNos){
|
|
/*Boolean flag = issureNotifyService.updateBatchConfirmStatus(notifyNos);
|
|
if(flag){
|
|
return R.ok();
|
|
}*/
|
|
return R.error();
|
|
}
|
|
|
|
/**
|
|
* 导入领用单
|
|
* @param file
|
|
* @param data
|
|
* @return
|
|
*/
|
|
@PostMapping("/saveIssureNotifyByExcel")
|
|
public R saveIssureNotifyByExcel(@RequestParam(value = "file") MultipartFile file, @ModelAttribute SOIssueNotifyHeaderData data){
|
|
String msg = issureNotifyService.saveIssureNotifyByExcel(file, data);
|
|
//String msg = issureNotifyService.importIssureNotifyByExcel(file);
|
|
return R.ok().put("errorMsg", msg);
|
|
}
|
|
|
|
/**
|
|
* @Description 检查用户是否有未下达的shoporder申请单 - rqrq
|
|
* @Title checkUserHasUnissueShopOrder
|
|
* @param data 查询条件(包含site和username)
|
|
* @return R
|
|
* @author rqrq
|
|
* @date 2025/11/03
|
|
*/
|
|
@PostMapping(value="/checkUserHasUnissueShopOrder")
|
|
@ResponseBody
|
|
public R checkUserHasUnissueShopOrder(@RequestBody SOIssueNotifyHeaderData data) throws Exception {
|
|
SOIssueNotifyHeaderData row = issureNotifyService.checkUserHasUnissueShopOrder(data);
|
|
return R.ok().put("row", row);
|
|
}
|
|
|
|
/**
|
|
* @Description 取消下达申请单 - rqrq
|
|
* @Title cancelIssueNotify
|
|
* @param data 申请单数据(包含site和notifyNo)
|
|
* @return R
|
|
* @author rqrq
|
|
* @date 2025/11/03
|
|
*/
|
|
@PostMapping(value="/cancelIssueNotify")
|
|
@ResponseBody
|
|
public R cancelIssueNotify(@RequestBody SOIssueNotifyHeaderData data) throws Exception {
|
|
issureNotifyService.cancelIssueNotify(data);
|
|
return R.ok();
|
|
}
|
|
|
|
@PostMapping(value="/saveNewSoIssueNotify")
|
|
public R saveNewSoIssueNotify(@RequestBody NewSoIssueNotifyDto data) throws Exception {
|
|
String rows = issureNotifyService.saveNewSoIssueNotify(data);
|
|
if("200".equals(rows)){
|
|
return R.ok("操作成功");
|
|
}
|
|
return R.error("操作失败");
|
|
}
|
|
|
|
|
|
/**-----------------------------------------无订单时的接口---------------------------------------------------------*/
|
|
@PostMapping(value="/getUserNoOrderNotifyNo")
|
|
@ResponseBody
|
|
public R getUserNoOrderNotifyNo(@RequestBody SOIssueNotifyHeaderData data) {
|
|
SOIssueNotifyHeaderData row = issureNotifyService.getUserNoOrderNotifyNo(data);
|
|
return R.ok().put("row", row);
|
|
}
|
|
|
|
@PostMapping(value="/createNoOrderNotify")
|
|
@ResponseBody
|
|
public R createNoOrderNotify(@RequestBody SOIssueNotifyHeaderData data) throws ParseException {
|
|
issureNotifyService.createNoOrderNotify(data);
|
|
return R.ok();
|
|
}
|
|
|
|
@PostMapping(value="/saveNoOrderNotify")
|
|
public R saveNoOrderNotify(@RequestBody NoOrderNotifyDto data) throws Exception {
|
|
String rows = issureNotifyService.saveNoOrderNotify(data);
|
|
if("200".equals(rows)){
|
|
return R.ok("操作成功");
|
|
}
|
|
return R.error("操作失败");
|
|
}
|
|
|
|
@PostMapping(value="/getNotifyNoOrderDetail")
|
|
@ResponseBody
|
|
public R getNotifyNoOrderDetail(@RequestBody SOIssueNotifyHeaderData data) {
|
|
List<SOIssueNotifyOrderListData> rows = issureNotifyService.getNotifyNoOrderDetail(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
@PostMapping(value="/getNoOrderMaterialList")
|
|
@ResponseBody
|
|
public R getNoOrderMaterialList(@RequestBody SOIssueNotifyOrderMaterialList data) {
|
|
List<NoOrderMaterialListVo> rows = issureNotifyService.getNoOrderMaterialList(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
@PostMapping(value="/saveNoOrderMaterialDetail")
|
|
@ResponseBody
|
|
public R saveNoOrderMaterialDetail(@RequestBody List<SOIssueNotifyOrderMaterialList> data) {
|
|
issureNotifyService.saveNoOrderMaterialDetail(data);
|
|
return R.ok();
|
|
}
|
|
|
|
@PostMapping(value="/searchNoOrderNotifyHeader")
|
|
@ResponseBody
|
|
public R searchNoOrderNotifyHeader(@RequestBody ShipmentIssueDto data) {
|
|
PageUtils page = issureNotifyService.searchNoOrderNotifyHeader(data);
|
|
return R.ok().put("page", page);
|
|
}
|
|
|
|
@PostMapping(value="/getNotifyNoOrderDetailByType")
|
|
@ResponseBody
|
|
public R getNotifyNoOrderDetailByType(@RequestBody SOIssueNotifyOrderList data)throws Exception {
|
|
List<SOIssueNotifyOrderList> rows = issureNotifyService.getNotifyNoOrderDetailByType(data);
|
|
return R.ok().put("rows", rows);
|
|
}
|
|
|
|
@PostMapping(value="/uploadNoorderNotifyExcel")
|
|
public R uploadNoorderNotifyExcel(@RequestParam("file") MultipartFile file,
|
|
@RequestParam("site") String site,
|
|
@RequestParam("notifyNo") String notifyNo) {
|
|
try {
|
|
List<ImportPartAttrVo> importPartAttrVos = issureNotifyService.uploadNoorderNotifyExcel(file, site, notifyNo);
|
|
return R.ok().put("rows",importPartAttrVos);
|
|
} catch (Exception e) {
|
|
return R.error("Excel导入失败: " + e.getMessage());
|
|
}
|
|
}
|
|
}
|