package com.example.erp.controller.pp;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import com.example.erp.common.Constants;
|
import com.example.erp.entity.pp.FlowCard;
|
import com.example.erp.entity.sd.DeliveryDetail;
|
import com.example.erp.entity.sd.Order;
|
import com.example.erp.common.Result;
|
import com.example.erp.entity.sd.OrderDetail;
|
import com.example.erp.entity.sd.OrderGlassDetail;
|
import com.example.erp.exception.ServiceException;
|
import com.example.erp.service.pp.FlowCardService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.sql.Date;
|
import java.util.Map;
|
|
@RestController
|
@Api(value = "流程卡controller", tags = {"流程卡操作接口"})
|
@RequestMapping("/processCard")
|
public class ProcessCardController {
|
@Autowired
|
FlowCardService flowCardService;
|
|
//流程卡管理查询
|
@ApiOperation("流程卡管理查询接口")
|
@SaCheckPermission("selectProcessCard.search")
|
@PostMapping("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}")
|
public Result dateProcess(
|
@PathVariable Integer pageNum,
|
@PathVariable Integer pageSize,
|
@PathVariable Date selectTime1,
|
@PathVariable Date selectTime2,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize, selectTime1, selectTime2, flowCard));
|
|
}
|
|
//分架查询
|
@ApiOperation("分架查询接口")
|
@SaCheckPermission("selectAddProcess.search")
|
@PostMapping("/selectAddProcess/{selectTime1}/{selectTime2}")
|
public Result selectAddProcess(
|
@PathVariable Date selectTime1,
|
@PathVariable Date selectTime2,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.selectAddProcess(selectTime1, selectTime2, flowCard));
|
}
|
|
//分架明细查询
|
@ApiOperation("分架明细查询接口")
|
@SaCheckPermission("splittingDetails.search")
|
@PostMapping("/detailsSelect/{orderId}")
|
public Result detailsSelect(
|
@PathVariable String orderId,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.detailsSelectSv(orderId, flowCard));
|
|
}
|
|
|
//删除流程卡
|
@ApiOperation("删除流程卡接口")
|
@SaCheckPermission("selectProcessCard.delete")
|
@PostMapping("/deleteFlowCard/{orderId}/{processId}/{userId}/{userName}")
|
public Result deleteOrderWork(
|
@PathVariable String orderId,
|
@PathVariable String processId,
|
@PathVariable String userId,
|
@PathVariable String userName
|
) {
|
// if(flowCardService.deleteFlowCardSv(orderId,processId)){
|
// return Result.seccess();
|
// }else {
|
// throw new ServiceException(Constants.Code_500,"删除失败,请检查是否已报工");
|
//
|
// }
|
return Result.seccess(flowCardService.deleteFlowCardSv(orderId, processId,userId,userName));
|
}
|
|
//修改排版状态
|
@ApiOperation("修改排版状态接口")
|
@SaCheckPermission("selectProcessCard.review")
|
@PostMapping("/updateLayoutStatus/{processId}/{state}")
|
public Result updateLayoutStatus(
|
@PathVariable String processId,
|
@PathVariable Integer state
|
) {
|
if (flowCardService.updateLayoutStatusSv(processId, state)) {
|
return Result.seccess();
|
} else {
|
throw new ServiceException(Constants.Code_500, "修改失败");
|
|
}
|
}
|
|
//分架新增明细查询
|
@ApiOperation("分架明细新增接口")
|
@PostMapping("/selectNoCard/{orderId}/{productionId}")
|
public Result SelectNoCard(
|
@PathVariable String orderId,
|
@PathVariable String productionId,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.selectNoCardSv(orderId, productionId, flowCard));
|
|
}
|
|
//添加流程卡
|
@ApiOperation("流程卡创建接口")
|
@SaCheckPermission("addProcessCard.add")
|
@PostMapping("/addFlowCard/{orderId}")
|
public Result AddOrderWork(@PathVariable String orderId,@RequestBody Map<String, Object> object) {
|
if (flowCardService.addFlowCardSv(orderId,object)) {
|
return Result.seccess();
|
} else {
|
throw new ServiceException(Constants.Code_500, "保存失败");
|
|
}
|
}
|
|
//查询第一次排产数据
|
@ApiOperation("排产界面加载查询接口")
|
@PostMapping("/selectLastScheduling/{selectTime1}/{selectTime2}")
|
public Result selectLastScheduling(
|
@PathVariable String selectTime1,
|
@PathVariable String selectTime2,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.selectLastScheduling(selectTime1, selectTime2, flowCard));
|
|
}
|
|
//查询排产数据
|
@ApiOperation("排产点击按钮查询接口")
|
@PostMapping("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
|
public Result selectScheduling(
|
@PathVariable String selectTime1,
|
@PathVariable String selectTime2,
|
@PathVariable String orderId,
|
@PathVariable String processes,
|
@PathVariable Integer state,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.selectSchedulingSv(selectTime1, selectTime2, orderId, processes, state, flowCard));
|
|
}
|
|
//流程卡明细查询
|
@ApiOperation("流程卡明细查询接口")
|
@SaCheckPermission("selectDetailProcessCard.search")
|
@PostMapping("/flowCardDetail/{processId}")
|
public Result flowCardDetail(
|
@PathVariable String processId,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.flowCardDetailSv(processId, flowCard));
|
|
}
|
|
@ApiOperation("流程卡打印查询接口")
|
@SaCheckPermission("selectPrintFlowCard.search")
|
@PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}")
|
public Result selectPrintFlowCard(
|
@PathVariable Date selectTime1,
|
@PathVariable Date selectTime2,
|
@PathVariable String orderId,
|
@PathVariable String project,
|
@PathVariable String userId,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId, flowCard));
|
}
|
|
@ApiOperation("流程卡明细查询接口")
|
@SaCheckPermission("printFlowCard.search")
|
@PostMapping("/selectPrint/{inquiryMode}")
|
public Result selectPrint(
|
@PathVariable String inquiryMode,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.selectPrintSv(object,inquiryMode));
|
|
}
|
|
@ApiOperation("打印流程卡数据查询接口")
|
@PostMapping("/getSelectPrinting/{printMerge}/{printLike}")
|
public Result getSelectPrinting(
|
@PathVariable String printMerge,
|
@PathVariable String printLike,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrintingSv(object,printMerge,printLike));
|
}
|
|
@ApiOperation("工程打印流程卡数据查询接口")
|
@PostMapping("/getSelectPrintProject/{printProject}")
|
public Result getSelectPrintProject(
|
@PathVariable String printProject) {
|
return Result.seccess(flowCardService.getSelectPrintProject(printProject));
|
}
|
|
@ApiOperation("打印标签数据查询接口")
|
@PostMapping("/getSelectPrintLabel/{projectNo}/{type}")
|
public Result getSelectPrintLabel(@PathVariable String projectNo,@PathVariable String type) {
|
return Result.seccess(flowCardService.getSelectPrintLabelSv(projectNo,type));
|
}
|
|
@ApiOperation("打印标签查询接口")
|
@PostMapping("/getSelectPrintLabel1")
|
public Result getSelectPrintLabel1(@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrintLabelSv1(object));
|
}
|
|
@ApiOperation("打印标签明细查询接口")
|
@PostMapping("/getSelectPrintLabelDetails")
|
public Result getSelectPrintLabelDetails(@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrintLabelDetails(object));
|
}
|
|
@ApiOperation("打印自定义标签数据查询接口")
|
@PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}")
|
public Result getSelectPrintCustomLabel( @PathVariable String type,
|
@PathVariable Integer lableType,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrintCustomLabelSv(type,lableType,object));
|
|
}
|
|
@ApiOperation("复选框修改排版状态")
|
@SaCheckPermission("selectProcessCard.review")
|
@PostMapping("/updateComposing")
|
public Result updateComposing(
|
@RequestBody Map<String, Object> object
|
) {
|
|
return Result.seccess(flowCardService.updateComposingSv(object));
|
}
|
|
@ApiOperation("流程卡打印明细数据排序查询接口")
|
@PostMapping("/printFlowCardDetails/{processId}/{technologyNumber}/{process}")
|
public Result printFlowCardDetails(@PathVariable String processId,
|
@PathVariable String technologyNumber,
|
@PathVariable String process,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.printFlowCardDetailsSv(processId, technologyNumber,process, flowCard));
|
}
|
|
@ApiOperation("保存打印排序接口")
|
@PostMapping("/printSort")
|
public Result printSort(@RequestBody Map<String, Object> object) {
|
if (flowCardService.printSortSv(object)) {
|
return Result.seccess();
|
} else {
|
throw new ServiceException(Constants.Code_500, "保存失败");
|
|
}
|
}
|
|
@ApiOperation("自定义标签打印明细接口")
|
@PostMapping("/getCustomLabelDetail/{name}/{form}/{id}")
|
public Result getCustomLabelDetail(
|
@PathVariable String name,
|
@PathVariable String form,
|
@PathVariable String id,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.getCustomLabelDetailSv(name,form,id, flowCard));
|
|
}
|
|
@ApiOperation("工程打印查询接口")
|
@SaCheckPermission("selectPrintFlowCard.search")
|
@PostMapping("/selectPrintPrintProject/{selectTime1}/{selectTime2}")
|
public Result selectPrintFlowCard(
|
@PathVariable Date selectTime1,
|
@PathVariable Date selectTime2) {
|
return Result.seccess(flowCardService.selectPrintFlowCard(selectTime1, selectTime2));
|
}
|
|
@ApiOperation("修改是否打印状态")
|
@PostMapping("/updatePrintState/{printState}")
|
public Result updatePrintState(
|
@PathVariable Integer printState,
|
@RequestBody Map<String, Object> object
|
) {
|
|
return Result.seccess(flowCardService.updatePrintStateSv(printState,object));
|
}
|
|
@ApiOperation("流程卡打印订单数据排序查询接口")
|
@PostMapping("/printFlowCardOrderSort/{orderId}")
|
public Result printFlowCardOrderSort(@PathVariable String orderId,
|
@RequestBody FlowCard flowCard) {
|
return Result.seccess(flowCardService.printFlowCardOrderSortSv(orderId, flowCard));
|
}
|
|
@ApiOperation("保存打印订单排序接口")
|
@PostMapping("/printOrderSort")
|
public Result printOrderSort(@RequestBody Map<String, Object> object) {
|
if (flowCardService.printOrderSort(object)) {
|
return Result.seccess();
|
} else {
|
throw new ServiceException(Constants.Code_500, "保存失败");
|
|
}
|
}
|
|
@ApiOperation("打印流程卡补片数据查询接口")
|
@PostMapping("/getSelectPrintingRefund/{printMerge}/{printLike}/{mergeTechnologyNumber}")
|
public Result getSelectPrintingRefund(
|
@PathVariable String printMerge,
|
@PathVariable String printLike,
|
@PathVariable String mergeTechnologyNumber,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrintingRefundSv(object,printMerge,printLike,mergeTechnologyNumber));
|
}
|
|
@ApiOperation("打印流程卡返工数据查询接口")
|
@PostMapping("/getSelectPrinRework/{printMerge}/{printLike}")
|
public Result getSelectPrinRework(
|
@PathVariable String printMerge,
|
@PathVariable String printLike,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrinReworkSv(object,printMerge,printLike));
|
}
|
|
@ApiOperation("流程卡明细按编号查询接口")
|
@PostMapping("/selectPrintDetails/{inquiryMode}/{type}")
|
public Result selectPrintDetails(
|
@PathVariable String inquiryMode,
|
@PathVariable Integer type,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.selectPrintDetailsSv(object,inquiryMode,type));
|
|
}
|
|
@ApiOperation("打印自定义标签数据按编号查询接口")
|
@PostMapping("/getSelectPrintCustomLabelDetails/{type}/{lableType}")
|
public Result getSelectPrintCustomLabelDetails( @PathVariable String type,
|
@PathVariable Integer lableType,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getSelectPrintCustomLabelDetailsSv(type,lableType,object));
|
|
}
|
|
@ApiOperation("打印自定义标签数据按工程查询接口")
|
@PostMapping("/getPrintCustomDataProjectNo/{type}/{projectNo}")
|
public Result getPrintCustomDataProjectNo( @PathVariable String type,
|
@PathVariable String projectNo) {
|
return Result.seccess(flowCardService.getPrintCustomDataProjectNo(type,projectNo));
|
|
}
|
|
@ApiOperation("排序汇总查询接口")
|
@PostMapping("/selectSortTable")
|
public Result selectSortTable(
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.selectSortTableSv(object));
|
}
|
|
@ApiOperation("合并流程卡接口")
|
@PostMapping("/mergeFlowCard")
|
public Result mergeFlowCard(@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.mergeFlowCard(object));
|
}
|
@ApiOperation("汉玻获取流程卡接口")
|
@PostMapping("/getProcessCardList/hanbo")
|
public Result getProcessCard(@RequestBody Map<String,String> processCards) {
|
return Result.seccess(flowCardService.getProcessCard(processCards));
|
}
|
|
@ApiOperation("复选框删除流程卡")
|
@SaCheckPermission("selectProcessCard.delete")
|
@PostMapping("/checkboxDelete")
|
public Result checkboxDelete(
|
@RequestBody Map<String, Object> object
|
) {
|
|
return Result.seccess(flowCardService.checkboxDeleteSv(object));
|
}
|
|
@ApiOperation("工程明细打印查询")
|
@PostMapping("/selectPrintProjectDetails/{projectNo}")
|
public Result selectPrintProjectDetails(
|
@PathVariable String projectNo) {
|
return Result.seccess(flowCardService.getPrintProjectDetails(projectNo));
|
|
}
|
@ApiOperation("工程明细打印标签查询")
|
@PostMapping("/getPrintCustomDataProjectNoDetail/{type}/{detailType}")
|
public Result getPrintCustomDataProjectNoDetail(
|
@PathVariable String type,
|
@PathVariable Integer detailType,
|
@RequestBody Map<String, Object> object) {
|
return Result.seccess(flowCardService.getPrintCustomDataProjectNoDetailSv(type,detailType,object));
|
|
}
|
|
@ApiOperation("修改工艺流程")
|
@PostMapping("/updateProcess/{processId}/{technologyNumber}/{orderId}/{process}")
|
public Result updateProcess(
|
@PathVariable String processId,
|
@PathVariable String technologyNumber,
|
@PathVariable String orderId,
|
@PathVariable String process,
|
@RequestBody Map<String, Object> object
|
) {
|
|
return Result.seccess(flowCardService.updateProcessSv(processId,technologyNumber,orderId,process,object));
|
}
|
}
|