|
|
|
@ -43,101 +43,20 @@ public class SfcDispatchController {
|
|
|
|
|
@Autowired
|
|
|
|
|
public SfcDispatchService sfcDispatchService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 派工生产批次清单导出
|
|
|
|
|
*
|
|
|
|
|
* @param workCenter
|
|
|
|
|
* @param dispatchStatus
|
|
|
|
|
* @param item
|
|
|
|
|
* @param workOrder
|
|
|
|
|
* @param shopOrder
|
|
|
|
|
* @param resrce
|
|
|
|
|
* @param resourceType
|
|
|
|
|
* @param operation
|
|
|
|
|
* @param sfc
|
|
|
|
|
* @param componentDescription
|
|
|
|
|
* @param turnOperation
|
|
|
|
|
* @param isDispatch
|
|
|
|
|
* @param startFromDate_S
|
|
|
|
|
* @param startToDate_S
|
|
|
|
|
* @param completeFromDate_S
|
|
|
|
|
* @param completeToDate_S
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@GetMapping("getSfcDispatch")
|
|
|
|
|
public R getSfcDispatch(String workCenter, String dispatchStatus, String item, String itemNumber, String workOrder, String shopOrder, String blankingSize,
|
|
|
|
|
String resrce, String resourceType, String operation, String operationDescription, String sfc, String component, String componentDescription, String turnOperation,
|
|
|
|
|
String isDispatch, String startFromDate_S, String startToDate_S, String completeFromDate_S, String completeToDate_S) {
|
|
|
|
|
List<SfcDispatchDto> list;
|
|
|
|
|
try {
|
|
|
|
|
SfcDispatchDto sfcDispatchDto = new SfcDispatchDto();
|
|
|
|
|
sfcDispatchDto.setSite(CommonMethods.getSite());
|
|
|
|
|
sfcDispatchDto.setUser(CommonMethods.getUser());
|
|
|
|
|
sfcDispatchDto.setWorkCenter(workCenter);
|
|
|
|
|
sfcDispatchDto.setDispatchStatus(dispatchStatus);
|
|
|
|
|
sfcDispatchDto.setItem(item);
|
|
|
|
|
sfcDispatchDto.setItemNumber(itemNumber);
|
|
|
|
|
sfcDispatchDto.setWorkOrder(workOrder);
|
|
|
|
|
sfcDispatchDto.setShopOrder(shopOrder);
|
|
|
|
|
sfcDispatchDto.setResrce(resrce);
|
|
|
|
|
sfcDispatchDto.setResourceType(resourceType);
|
|
|
|
|
sfcDispatchDto.setOperation(operation);
|
|
|
|
|
sfcDispatchDto.setSfc(sfc);
|
|
|
|
|
sfcDispatchDto.setBlankingSize(blankingSize);
|
|
|
|
|
sfcDispatchDto.setComponent(component);
|
|
|
|
|
sfcDispatchDto.setComponentDescription(componentDescription);
|
|
|
|
|
sfcDispatchDto.setTurnOperation(turnOperation);
|
|
|
|
|
sfcDispatchDto.setIsDispatch(isDispatch);
|
|
|
|
|
if (startFromDate_S != null) {
|
|
|
|
|
sfcDispatchDto.setStartFromDate(DateUtil.parse(startFromDate_S));
|
|
|
|
|
}
|
|
|
|
|
if (startToDate_S != null) {
|
|
|
|
|
sfcDispatchDto.setStartToDate(DateUtil.parse(startToDate_S));
|
|
|
|
|
}
|
|
|
|
|
if (completeFromDate_S != null) {
|
|
|
|
|
sfcDispatchDto.setCompleteFromDate(DateUtil.parse(completeFromDate_S));
|
|
|
|
|
}
|
|
|
|
|
if (completeToDate_S != null) {
|
|
|
|
|
sfcDispatchDto.setCompleteToDate(DateUtil.parse(completeToDate_S));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list = sfcDispatchService.findSfcDispatchList(sfcDispatchDto);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return R.failed(e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return R.ok(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询派工数据
|
|
|
|
|
*
|
|
|
|
|
* @param sfcDispatchDto
|
|
|
|
|
* @param paramMap
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@PostMapping("findSfcDispatch")
|
|
|
|
|
public R findSfcDispatch(@RequestBody SfcDispatchDto sfcDispatchDto) {
|
|
|
|
|
@GetMapping("findSfcDispatch")
|
|
|
|
|
public R findSfcDispatch(@RequestParam(required = false) Map paramMap) {
|
|
|
|
|
List<SfcDispatchDto> list;
|
|
|
|
|
try {
|
|
|
|
|
sfcDispatchDto.setSite(CommonMethods.getSite());
|
|
|
|
|
sfcDispatchDto.setUser(CommonMethods.getUser());
|
|
|
|
|
if (sfcDispatchDto.getStartFromDate_S() != null) {
|
|
|
|
|
sfcDispatchDto.setStartFromDate(DateUtil.parse(sfcDispatchDto.getStartFromDate_S()));
|
|
|
|
|
}
|
|
|
|
|
if (sfcDispatchDto.getStartToDate_S() != null) {
|
|
|
|
|
sfcDispatchDto.setStartToDate(DateUtil.parse(sfcDispatchDto.getStartToDate_S()));
|
|
|
|
|
}
|
|
|
|
|
if (sfcDispatchDto.getCompleteFromDate_S() != null) {
|
|
|
|
|
sfcDispatchDto.setCompleteFromDate(DateUtil.parse(sfcDispatchDto.getCompleteFromDate_S()));
|
|
|
|
|
}
|
|
|
|
|
if (sfcDispatchDto.getCompleteToDate_S() != null) {
|
|
|
|
|
sfcDispatchDto.setCompleteToDate(DateUtil.parse(sfcDispatchDto.getCompleteToDate_S()));
|
|
|
|
|
}
|
|
|
|
|
paramMap.put("site", CommonMethods.getSite());
|
|
|
|
|
|
|
|
|
|
list = sfcDispatchService.findSfcDispatchList(sfcDispatchDto);
|
|
|
|
|
list = sfcDispatchService.findSfcDispatchList(paramMap);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return R.failed(e.getMessage());
|
|
|
|
|
}
|
|
|
|
@ -297,24 +216,16 @@ public class SfcDispatchController {
|
|
|
|
|
return R.ok(result);
|
|
|
|
|
}
|
|
|
|
|
@PostMapping("/gantt-list")
|
|
|
|
|
public R ganttList(@RequestBody SfcDispatchDto sfcDispatchDto) {
|
|
|
|
|
public R ganttList(@RequestParam(required = false) Map paramMap) {
|
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
if (StringUtil.isBlank(sfcDispatchDto.getStartFromDate_S())) {
|
|
|
|
|
throw BusinessException.build("派工开始时间不能为空!");
|
|
|
|
|
}
|
|
|
|
|
if (StringUtil.isBlank(sfcDispatchDto.getStartToDate_S())) {
|
|
|
|
|
throw BusinessException.build("派工开始时间不能为空!");
|
|
|
|
|
}
|
|
|
|
|
sfcDispatchDto.setSite(site);
|
|
|
|
|
sfcDispatchDto.setDispatchStatus(DispatchStatusEnum.RELEASE.getCode());
|
|
|
|
|
sfcDispatchDto.setStartFromDate(DateUtil.parseDate(sfcDispatchDto.getStartFromDate_S()));
|
|
|
|
|
sfcDispatchDto.setStartToDate(DateUtil.parseDate(sfcDispatchDto.getStartToDate_S()));
|
|
|
|
|
paramMap.put("site", site);
|
|
|
|
|
paramMap.put("", DispatchStatusEnum.RELEASE.getCode());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result = sfcDispatchService.ganttList(site, sfcDispatchDto);
|
|
|
|
|
result = sfcDispatchService.ganttList(site, paramMap);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return R.failed(e.getMessage());
|
|
|
|
|
}
|
|
|
|
|