原材料库优化问题点0808
This commit is contained in:
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
public class WuliaoDto {
|
||||
String productDescription;
|
||||
String supplierName;
|
||||
String ingotBatch;
|
||||
Double count1;
|
||||
Double count2;
|
||||
Double count3;
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
WHERE
|
||||
m.PalletSN = p.vehicle_code2
|
||||
AND (p.region_code='YL' or p.region_code='YLHC')
|
||||
AND p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
) a
|
||||
GROUP BY
|
||||
PalletSN;
|
||||
@@ -95,7 +97,7 @@
|
||||
FROM
|
||||
sch_base_point
|
||||
WHERE
|
||||
region_code IN ( 'YL','YLHC', 'HW', 'HWK' )
|
||||
region_code IN ( 'YL','YLHC' )
|
||||
) a,
|
||||
(
|
||||
SELECT
|
||||
@@ -128,19 +130,22 @@
|
||||
SELECT
|
||||
supplierName,
|
||||
productDescription,
|
||||
ingotBatch,
|
||||
count(*) AS count1,
|
||||
COUNT(DISTINCT p.vehicle_code2) AS count2,
|
||||
COUNT( DISTINCT p.vehicle_code2 ) AS count2,
|
||||
sum( incomingWeight ) AS count3,
|
||||
sum( incomingLength ) AS count4
|
||||
FROM
|
||||
sch_base_material m
|
||||
LEFT JOIN sch_base_point p ON p.vehicle_code2 = m.PalletSN
|
||||
INNER JOIN sch_base_point p ON p.vehicle_code2 = m.PalletSN
|
||||
WHERE
|
||||
p.region_code LIKE '%YL%'
|
||||
AND p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND p.point_code LIKE 'HJ%'
|
||||
AND p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
GROUP BY
|
||||
supplierName,
|
||||
ingotBatch,
|
||||
productDescription
|
||||
</select>
|
||||
|
||||
|
||||
@@ -46,16 +46,22 @@ public class BoardServiceImpl implements BoardService {
|
||||
}
|
||||
|
||||
public JSONObject rk() {
|
||||
KcDto kcDto = boardMapper.kc();
|
||||
//库存情况
|
||||
/*KcDto kcDto = boardMapper.kc();
|
||||
kcDto.setList(boardMapper.wuliao());*/
|
||||
KcDto kcDto = new KcDto();
|
||||
kcDto.setList(boardMapper.wuliao());
|
||||
//货位占用
|
||||
HwDto hwDto = boardMapper.hw();
|
||||
//库内物料
|
||||
List<WlDto> knList = boardMapper.kn();
|
||||
List<WlDto> wrkList = boardMapper.wrk();
|
||||
//未入库物料
|
||||
//List<WlDto> wrkList = boardMapper.wrk();
|
||||
RkDto rkDto = new RkDto();
|
||||
rkDto.setKc(kcDto);
|
||||
rkDto.setHw(hwDto);
|
||||
rkDto.setKn(knList);
|
||||
rkDto.setWrk(wrkList);
|
||||
//rkDto.setWrk(wrkList);
|
||||
return JSONObject.parseObject(JSON.toJSONString(rkDto, SerializerFeature.WriteNullStringAsEmpty));
|
||||
}
|
||||
|
||||
|
||||
@@ -70,13 +70,4 @@ public class AcsToWmsController {
|
||||
public ResponseEntity<Object> notify(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(acsToWmsService.notify(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
// @PostMapping("/notify")
|
||||
// @Log("acs通知wms")
|
||||
// @ApiOperation("acs通知wms")
|
||||
// //@SaCheckPermission("@el.check('schBaseTask:add')")
|
||||
// @SaIgnore
|
||||
// public ResponseEntity<Object> notify(@RequestBody JSONObject param) {
|
||||
// return new ResponseEntity<>(acsToWmsService.notify(param), HttpStatus.OK);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ public interface AcsToWmsService {
|
||||
/** ACS请求接口 */
|
||||
BaseResponse acsApply(JSONObject param);
|
||||
|
||||
/** 手持请求接口 */
|
||||
BaseResponse pdaApply(JSONObject param);
|
||||
|
||||
/** 任务反馈 */
|
||||
BaseResponse status(JSONObject param);
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.RedisUtils;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.system.service.logicflow.dao.Stage;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
@@ -27,6 +28,7 @@ import org.nl.wms.sch.point.service.impl.SchBasePointServiceImpl;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
|
||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
||||
import org.nl.wms.sch.task_manage.enums.PointStatusEnum;
|
||||
@@ -93,18 +95,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@SneakyThrows
|
||||
public BaseResponse acsApply(JSONObject param) {
|
||||
String requestNo = param.getString("requestNo");
|
||||
String requestMethodCode = param.getString("request_medthod_code"); // 获取请求方法名
|
||||
String requestMethodName = param.getString("request_medthod_name");
|
||||
BaseResponse result = BaseResponse.build(requestNo);
|
||||
String device_code = param.getString("device_code");
|
||||
param.put("config_code",requestMethodCode);
|
||||
param.put("user_id", GeneralDefinition.ACS_ID);
|
||||
param.put("person_name",GeneralDefinition.ACS_NAME);
|
||||
param.put("create_mode","2");
|
||||
try {
|
||||
if(ObjectUtil.isEmpty(requestMethodCode)){
|
||||
throw new BadRequestException("任务类型不正确!requestMethodCode:"+requestMethodName+",device_code:"+device_code);
|
||||
}
|
||||
AbstractTask task = taskFactory.getTask(requestMethodCode);
|
||||
// 执行创建任务
|
||||
task.apply(param);
|
||||
result = this.apply(param);
|
||||
} catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
log.error("ACS请求LMS出现错误: {}{}", e,e.getMessage());
|
||||
@@ -112,12 +108,60 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
result.setMessage(message);
|
||||
result.setRequestNo(requestNo);
|
||||
// 消息通知
|
||||
noticeService.createNotice("异常信息:" + message, "acsApply: " + param.getString("request_medthod_code"),
|
||||
noticeService.createNotice("异常信息:" + message, "请求信息: " + param.getString("request_medthod_code"),
|
||||
NoticeTypeEnum.EXCEPTION.getCode());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public BaseResponse pdaApply(JSONObject param){
|
||||
String requestNo = param.getString("requestNo");
|
||||
BaseResponse result = BaseResponse.build(requestNo);
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
if(ObjectUtil.isEmpty(param.getString("user_id"))){
|
||||
param.put("user_id",currentUserId);
|
||||
param.put("person_name",nickName);
|
||||
}
|
||||
param.put("create_mode","3");
|
||||
try {
|
||||
result = this.apply(param);
|
||||
} catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
log.error("请求LMS出现错误: {}{}", e,e.getMessage());
|
||||
result.setCode(HttpStatus.HTTP_BAD_REQUEST);
|
||||
result.setMessage(message);
|
||||
result.setRequestNo(requestNo);
|
||||
// 消息通知
|
||||
noticeService.createNotice("异常信息:" + message, "请求信息: " + param.getString("request_medthod_code"),
|
||||
NoticeTypeEnum.EXCEPTION.getCode());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public BaseResponse apply(JSONObject param){
|
||||
String requestNo = param.getString("requestNo");
|
||||
BaseResponse result = BaseResponse.build(requestNo);
|
||||
String requestMethodCode = param.getString("request_medthod_code");
|
||||
String requestMethodName = param.getString("request_medthod_name");
|
||||
String device_code = param.getString("device_code");
|
||||
//设置任务类型
|
||||
param.put("config_code",requestMethodCode);
|
||||
AbstractTask task = taskFactory.getTask(requestMethodCode);
|
||||
if(ObjectUtil.isEmpty(requestMethodCode)){
|
||||
throw new BadRequestException("任务类型不能为空!requestMethodCode:"+requestMethodName+",device_code:"+device_code);
|
||||
}
|
||||
if(ObjectUtil.isNull(task)){
|
||||
throw new BadRequestException("任务类型不正确!requestMethodCode:"+requestMethodName+",device_code:"+device_code);
|
||||
}
|
||||
// 执行创建任务
|
||||
task.apply(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务反馈
|
||||
*/
|
||||
|
||||
@@ -18,12 +18,10 @@ import org.nl.wms.sch.material.service.dao.Material;
|
||||
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper;
|
||||
import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
|
||||
import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper;
|
||||
import org.nl.wms.sch.workorder.controller.service.IWorkorderService;
|
||||
import org.nl.wms.sch.workorder.controller.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.service.IWorkorderService;
|
||||
import org.nl.wms.sch.workorder.service.dao.Workorder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -57,7 +57,6 @@ public class PdaServiceImpl implements PdaService {
|
||||
|
||||
@Override
|
||||
public PdaResponseVo dwzt(JSONObject param) {
|
||||
// acsToWmsService.notify(param);
|
||||
return PdaResponseVo.pdaResultOk("回温状态查询成功");
|
||||
}
|
||||
|
||||
@@ -66,7 +65,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
param.put("request_medthod_code", "YCLRKTask");
|
||||
param.put("request_medthod_name", "原材料入库");
|
||||
param.put("device_code",param.getString("start_point"));
|
||||
BaseResponse baseResponse=acsToWmsService.acsApply(param);
|
||||
BaseResponse baseResponse=acsToWmsService.pdaApply(param);
|
||||
return PdaResponseVo.pdaResultOk(baseResponse.getMessage());
|
||||
}
|
||||
@Override
|
||||
@@ -74,7 +73,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
param.put("request_medthod_code", "YCLCKTask");
|
||||
param.put("request_medthod_name", "原材料出库");
|
||||
param.put("device_code",param.getString("start_point"));
|
||||
BaseResponse baseResponse=acsToWmsService.acsApply(param);
|
||||
BaseResponse baseResponse=acsToWmsService.pdaApply(param);
|
||||
return PdaResponseVo.pdaResultOk(baseResponse.getMessage());
|
||||
}
|
||||
|
||||
@@ -83,7 +82,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
param.put("request_medthod_code", "POINTTask");
|
||||
param.put("request_medthod_name", "点对点任务");
|
||||
param.put("device_code",param.getString("start_point"));
|
||||
BaseResponse baseResponse=acsToWmsService.acsApply(param);
|
||||
BaseResponse baseResponse=acsToWmsService.pdaApply(param);
|
||||
return PdaResponseVo.pdaResultOk(baseResponse.getMessage());
|
||||
}
|
||||
|
||||
@@ -150,7 +149,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
param.put("device_code","FBC01");
|
||||
param.put("start_point","FBC01");
|
||||
param.put("next_point","DKT01");
|
||||
BaseResponse baseResponse=acsToWmsService.acsApply(param);
|
||||
BaseResponse baseResponse=acsToWmsService.pdaApply(param);
|
||||
return PdaResponseVo.pdaResultOk(baseResponse.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,5 +54,4 @@ public class PointDetailController {
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,4 +10,5 @@ public class PointDetailAdd {
|
||||
private String mode;
|
||||
private String time;
|
||||
private String workorder_code;
|
||||
private String status;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,14 @@ public class SchBasePointController {
|
||||
return new ResponseEntity<>(schBasePointService.getPointList(region),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getPointsByRegionCodes")
|
||||
@Log("获取区域下拉框")
|
||||
@ApiOperation("获取区域下拉框")
|
||||
//@SaCheckPermission("@el.check('schBaseRegion:list')")
|
||||
public ResponseEntity<Object> getPointsByRegionCodes(@RequestBody(required = false) String RegionCodes){
|
||||
return new ResponseEntity<>(schBasePointService.getPointsByRegionCodes(RegionCodes),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/outbound")
|
||||
@Log("原材料异常出库")
|
||||
@ApiOperation("原材料异常出库")
|
||||
|
||||
@@ -56,6 +56,13 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
*/
|
||||
List<SchBasePoint> getPointList(SchBasePoint region);
|
||||
|
||||
/**
|
||||
* 获取点位
|
||||
* @param RegionCodes
|
||||
* @return
|
||||
*/
|
||||
List<SchBasePoint> getPointsByRegionCodes(String RegionCodes);
|
||||
|
||||
/**
|
||||
* 更改固化室点位状态
|
||||
* @param jsonObject
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.sch.point.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,10 +24,7 @@ import org.nl.wms.util.PointUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -192,6 +189,18 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
.eq(SchBasePoint::getIs_has_workder, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchBasePoint> getPointsByRegionCodes(String RegionCodes) {
|
||||
Set<String> regions = new HashSet<>();
|
||||
String[] split = RegionCodes.split(",");
|
||||
regions.addAll(Arrays.asList(split));
|
||||
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.in(ObjectUtil.isNotEmpty(RegionCodes),SchBasePoint::getRegion_code,regions)
|
||||
.eq(SchBasePoint::getIs_has_workder, 1)
|
||||
.orderByAsc(SchBasePoint::getPoint_code)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(JSONObject jsonObject) {
|
||||
|
||||
|
||||
@@ -41,6 +41,14 @@ public class ReportController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryYlDetail(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/yl/outdetail")
|
||||
@Log("原料库工单库存明细")
|
||||
@ApiOperation("原料库工单库存明细")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> queryYlOutDetail(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryYlOutDetail(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/yl/in")
|
||||
@Log("原材入库明细")
|
||||
@ApiOperation("原材入库明细")
|
||||
@@ -74,6 +82,13 @@ public class ReportController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryHwIn(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/hw/inpending")
|
||||
@Log("回温间待入库明细")
|
||||
@ApiOperation("回温间待入库明细")
|
||||
public ResponseEntity<Object> queryHwInPending(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryHwInPending(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/hw/out")
|
||||
@Log("回温间出库存明细")
|
||||
@ApiOperation("回温间出库明细")
|
||||
@@ -82,6 +97,14 @@ public class ReportController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryHwOut(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/hw/outpending")
|
||||
@Log("回温间待出库存明细")
|
||||
@ApiOperation("回温间待出库明细")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> queryHwOutPending(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryHwOutPending(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@GetMapping("/yl/detail/download")
|
||||
@Log("查询详情导出")
|
||||
@@ -127,15 +150,30 @@ public class ReportController {
|
||||
reportService.queryHwInDownload(whereJson,page,response);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@GetMapping("/hw/inpending/download")
|
||||
@Log("待入库明细导出")
|
||||
@ApiOperation("查询详情导出")
|
||||
public void queryHwInPendingDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
|
||||
reportService.queryHwInPendingDownload(whereJson,page,response);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@GetMapping("/hw/out/download")
|
||||
@Log("查询详情导出")
|
||||
@ApiOperation("查询详情导出")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public void queryHwOutDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
|
||||
reportService.queryHwOutDownload(whereJson,page,response);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@GetMapping("/hw/outpending/download")
|
||||
@Log("查询详情导出")
|
||||
@ApiOperation("查询详情导出")
|
||||
public void queryHwOutPendingDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
|
||||
reportService.queryHwOutPendingDownload(whereJson,page,response);
|
||||
}
|
||||
|
||||
@GetMapping("/getSupplierNameList")
|
||||
@Log("查询供应商名称列表")
|
||||
@ApiOperation("查询供应商名称列表")
|
||||
|
||||
@@ -3,10 +3,7 @@ package org.nl.wms.sch.report.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.sch.report.service.dto.HwDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YlDto;
|
||||
import org.nl.wms.sch.report.service.dto.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
@@ -27,10 +24,22 @@ public interface IReportService extends IService<ReportDto> {
|
||||
|
||||
IPage<HwDto> queryHwIn(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<HwDto> queryHwInPending(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<HwDto> queryHwOut(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<HwDto> queryHwOutPending(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<YlDto> queryYlDetail(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 查询工单库存
|
||||
* @param whereJson
|
||||
* @param pageable
|
||||
* @return
|
||||
*/
|
||||
IPage<YCLKCDto> queryYlOutDetail(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<YlDto> queryYlIn(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<YlDto> queryYlOut(ReportQuery whereJson, PageQuery pageable);
|
||||
@@ -42,9 +51,15 @@ public interface IReportService extends IService<ReportDto> {
|
||||
void queryYlOutDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
void queryHwDetailDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
void queryHwInDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
void queryHwInPendingDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
void queryHwOutDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
void queryHwOutPendingDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
List<String> getSupplierNameList();
|
||||
|
||||
List<String> getProductDescriptionList();
|
||||
|
||||
@@ -3,10 +3,7 @@ package org.nl.wms.sch.report.service.dao.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.nl.wms.sch.report.service.dto.HwDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YlDto;
|
||||
import org.nl.wms.sch.report.service.dto.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,6 +25,8 @@ public interface ReportMapper extends BaseMapper<ReportDto> {
|
||||
*/
|
||||
IPage<YlDto> queryYlDetail(IPage<YlDto> pages, ReportQuery query);
|
||||
|
||||
IPage<YCLKCDto> queryYlOutDetail(IPage<YCLKCDto> pages, ReportQuery query);
|
||||
|
||||
IPage<YlDto> queryYlIn(IPage<YlDto> pages, ReportQuery query);
|
||||
|
||||
IPage<YlDto> queryYlOut(IPage<YlDto> pages, ReportQuery query);
|
||||
@@ -36,8 +35,12 @@ public interface ReportMapper extends BaseMapper<ReportDto> {
|
||||
|
||||
IPage<HwDto> queryHwIn(IPage<HwDto> pages, ReportQuery query);
|
||||
|
||||
IPage<HwDto> queryHwInPending(IPage<HwDto> pages, ReportQuery query);
|
||||
|
||||
IPage<HwDto> queryHwOut(IPage<HwDto> pages, ReportQuery query);
|
||||
|
||||
IPage<HwDto> queryHwOutPending(IPage<HwDto> pages, ReportQuery query);
|
||||
|
||||
@Select("select supplierName from sch_base_material group by supplierName")
|
||||
List<String> getSupplierNameList();
|
||||
|
||||
|
||||
@@ -75,6 +75,78 @@
|
||||
ORDER BY point_code ASC
|
||||
</select>
|
||||
|
||||
<select id="queryYlOutDetail" resultType="org.nl.wms.sch.report.service.dto.YCLKCDto">
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.region_name AS regionName,
|
||||
p.vehicle_code2 AS subTray,
|
||||
p.vehicle_code AS motherTray,
|
||||
ANY_VALUE (t.somtOrderNo) AS somtOrderNo,
|
||||
ANY_VALUE (t.moname) AS moname,
|
||||
ANY_VALUE (t.status) AS status,
|
||||
ANY_VALUE (t.mode) AS mode,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number
|
||||
FROM
|
||||
pdm_bd_workorder_two t
|
||||
LEFT JOIN sch_base_point p ON t.palletSN = p.vehicle_code2
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON t.palletSN = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND t.STATUS IN ( '0','1')
|
||||
AND p.region_code IN ( 'YL','YLHC','KJHC' )
|
||||
<if test="query.supplierName != null">
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
</if>
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
<if test="query.status != null">
|
||||
and t.status = #{query.status}
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY point_code ASC
|
||||
</select>
|
||||
|
||||
<select id="queryYlIn" resultType="org.nl.wms.sch.report.service.dto.YlDto">
|
||||
SELECT
|
||||
m.lotSN,
|
||||
@@ -160,9 +232,6 @@
|
||||
</select>
|
||||
|
||||
<select id="queryHwDetail" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT a.*,( SELECT count( * ) FROM sch_base_material m2 WHERE m2.PalletSN = a.subTray ) as number
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.point_name AS pointName,
|
||||
@@ -172,26 +241,50 @@
|
||||
p.vehicle_code AS motherTray,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( v.standing_time ) AS standingTime,
|
||||
ANY_VALUE ( m.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number,
|
||||
TIMESTAMPDIFF(
|
||||
HOUR,
|
||||
p.update_time,
|
||||
curtime()) AS usedTime
|
||||
FROM
|
||||
sch_base_point p
|
||||
LEFT JOIN sch_base_material m ON p.vehicle_code2 = m.PalletSN
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
vehicle_code2 != ''
|
||||
AND vehicle_code2 IS NOT NULL
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON p.vehicle_code2 = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND p.point_code LIKE 'XHW%'
|
||||
AND v.group_bind_material_status = '2'
|
||||
<if test="query.supplierName != null">
|
||||
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
@@ -199,52 +292,68 @@
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY pointCode ASC
|
||||
) a
|
||||
</select>
|
||||
|
||||
<select id="queryHwIn" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT a.*,( SELECT count( * ) FROM sch_base_material m2 WHERE m2.PalletSN = a.subTray ) as number
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.point_name AS pointName,
|
||||
p.region_code AS regionCode,
|
||||
p.region_name AS regionName,
|
||||
p.vehicle_code2 AS subTray,
|
||||
p.vehicle_code AS motherTray,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( v.standing_time ) AS standingTime,
|
||||
ANY_VALUE ( m.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number,
|
||||
TIMESTAMPDIFF(
|
||||
HOUR,
|
||||
p.update_time,
|
||||
curtime()) AS usedTime
|
||||
FROM
|
||||
sch_base_task t
|
||||
LEFT JOIN sch_base_point p on t.point_code2=p.point_code and t.point_code2 like 'XHW%'
|
||||
LEFT JOIN sch_base_material m ON p.vehicle_code2 = m.PalletSN
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||
LEFT JOIN sch_base_point p ON t.point_code2 = p.point_code
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON t.vehicle_code2 = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND t.point_code2 LIKE 'XHW%'
|
||||
AND t.task_status in ('5')
|
||||
<if test="query.supplierName != null">
|
||||
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
@@ -252,52 +361,139 @@
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY p.update_time DESC, pointCode ASC
|
||||
</select>
|
||||
|
||||
<select id="queryHwInPending" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.region_name AS regionName,
|
||||
p.vehicle_code2 AS subTray,
|
||||
p.vehicle_code AS motherTray,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number
|
||||
FROM
|
||||
pdm_bd_workorder_two t
|
||||
LEFT JOIN sch_base_point p ON t.palletSN = p.vehicle_code2
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON t.palletSN = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND t.STATUS IN ( '0','1','2' )
|
||||
AND p.region_code IN ( 'YL','YLHC','KJHC' )
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
</if>
|
||||
<if test="query.lotSN != null">
|
||||
and m2.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
<if test="query.supplierName != null">
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY p.update_time DESC, pointCode ASC
|
||||
) a
|
||||
</select>
|
||||
|
||||
<select id="queryHwOut" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT a.*,( SELECT count( * ) FROM sch_base_material m2 WHERE m2.PalletSN = a.subTray ) as number
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.point_name AS pointName,
|
||||
p.region_code AS regionCode,
|
||||
p.region_name AS regionName,
|
||||
p.vehicle_code2 AS subTray,
|
||||
p.vehicle_code AS motherTray,
|
||||
ANY_VALUE ( p2.point_code ) AS pointCode2,
|
||||
ANY_VALUE ( p2.region_name ) AS regionName2,
|
||||
ANY_VALUE ( t.vehicle_code2 ) AS subTray,
|
||||
ANY_VALUE ( t.vehicle_code ) AS motherTray,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( v.standing_time ) AS standingTime,
|
||||
ANY_VALUE ( m.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number,
|
||||
TIMESTAMPDIFF(
|
||||
HOUR,
|
||||
p.update_time,
|
||||
curtime()) AS usedTime
|
||||
FROM
|
||||
sch_base_task t
|
||||
LEFT JOIN sch_base_point p on t.point_code2=p.point_code and t.point_code1 like 'XHW%'
|
||||
LEFT JOIN sch_base_material m ON p.vehicle_code2 = m.PalletSN
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||
LEFT JOIN sch_base_point p ON t.point_code1 = p.point_code
|
||||
LEFT JOIN sch_base_point p2 ON t.point_code2 = p2.point_code
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON t.vehicle_code2 = v.vehicle_code
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON t.vehicle_code2 = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND t.is_delete = '0'
|
||||
AND t.point_code1 LIKE 'XHW%'
|
||||
AND t.point_code2 LIKE 'FHW%'
|
||||
<if test="query.supplierName != null">
|
||||
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
@@ -305,16 +501,89 @@
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY p.update_time DESC, pointCode ASC
|
||||
</select>
|
||||
|
||||
<select id="queryHwOutPending" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.region_name AS regionName,
|
||||
ANY_VALUE ( p2.point_code ) AS pointCode2,
|
||||
ANY_VALUE ( p2.region_name ) AS regionName2,
|
||||
ANY_VALUE ( t.vehicle_code2 ) AS subTray,
|
||||
ANY_VALUE ( t.vehicle_code ) AS motherTray,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number,
|
||||
TIMESTAMPDIFF(
|
||||
HOUR,
|
||||
p.update_time,
|
||||
curtime()) AS usedTime
|
||||
FROM
|
||||
sch_base_task t
|
||||
LEFT JOIN sch_base_point p ON t.point_code1 = p.point_code
|
||||
LEFT JOIN sch_base_point p2 ON t.point_code2 = p2.point_code
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m2.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON p.vehicle_code2 = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND t.is_delete = '0'
|
||||
AND t.task_status in ('1','2','3','4')
|
||||
AND t.point_code1 LIKE 'XHW%'
|
||||
AND t.point_code2 LIKE 'FHW%'
|
||||
<if test="query.supplierName != null">
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
</if>
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY p.update_time DESC, pointCode ASC
|
||||
) a
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -14,6 +14,10 @@ public class HwDto implements Serializable {
|
||||
private String regionCode;
|
||||
/** 区域名称 */
|
||||
private String regionName;
|
||||
/** 点位名称 */
|
||||
private String pointCode2;
|
||||
/** 区域名称 */
|
||||
private String regionName2;
|
||||
/** 子托号 */
|
||||
private String subTray;
|
||||
/** 母拖号 */
|
||||
|
||||
@@ -29,4 +29,8 @@ public class ReportQuery implements Serializable {
|
||||
|
||||
private String start_point;
|
||||
private String end_point;
|
||||
//每托根数
|
||||
private Integer number;
|
||||
//工单状态
|
||||
private Integer status;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.nl.wms.sch.report.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class YCLKCDto implements Serializable {
|
||||
/** 点位编码 */
|
||||
private String pointCode;
|
||||
/** 区域名称 */
|
||||
private String regionName;
|
||||
/** 子托号 */
|
||||
private String subTray;
|
||||
/** 母拖号 */
|
||||
private String motherTray;
|
||||
/** 出库单号 */
|
||||
private String somtOrderNo;
|
||||
/** 生产工单 */
|
||||
private String moname;
|
||||
/** 工单状态 */
|
||||
private String status;
|
||||
/** 回温模式 */
|
||||
private String mode;
|
||||
/** 入库时间 */
|
||||
private String updateTime;
|
||||
/** 棒源等级 */
|
||||
private String siliconGrade;
|
||||
/** 物料名称 */
|
||||
private String productDescription;
|
||||
/** 供应商名称 */
|
||||
private String supplierName;
|
||||
/** 客户来料批次号 */
|
||||
private String ingotBatch;
|
||||
/** 数量 */
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -14,10 +14,7 @@ import org.nl.wms.sch.material.service.dao.Material;
|
||||
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper;
|
||||
import org.nl.wms.sch.report.service.IReportService;
|
||||
import org.nl.wms.sch.report.service.dao.mapper.ReportMapper;
|
||||
import org.nl.wms.sch.report.service.dto.HwDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YlDto;
|
||||
import org.nl.wms.sch.report.service.dto.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.nl.common.utils.PageUtil;
|
||||
@@ -50,6 +47,13 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<YCLKCDto> queryYlOutDetail(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<YCLKCDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryYlOutDetail(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<YlDto> queryYlIn(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<YlDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
@@ -76,12 +80,24 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<HwDto> queryHwInPending(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<HwDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryHwInPending(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
public IPage<HwDto> queryHwOut(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<HwDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryHwOut(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
public IPage<HwDto> queryHwOutPending(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<HwDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryHwOutPending(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void queryYlDetailDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
|
||||
@@ -169,8 +185,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
for(HwDto detailDto:pages.getRecords()){
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("点位编码",detailDto.getPointCode());
|
||||
mp.put("点位名称",detailDto.getPointCode());
|
||||
mp.put("区域编码",detailDto.getRegionCode());
|
||||
mp.put("区域名称",detailDto.getRegionName());
|
||||
mp.put("子托号",detailDto.getSubTray());
|
||||
mp.put("母拖号",detailDto.getMotherTray());
|
||||
@@ -181,7 +195,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
mp.put("客户来料批次号",detailDto.getIngotBatch());
|
||||
mp.put("回温时间",detailDto.getStandingTime());
|
||||
mp.put("已回温时间",detailDto.getUsedTime());
|
||||
mp.put("数量",detailDto.getNumber());
|
||||
mp.put("每托数量(根)",detailDto.getNumber());
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
@@ -195,8 +209,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
for(HwDto detailDto:pages.getRecords()){
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("点位编码",detailDto.getPointCode());
|
||||
mp.put("点位名称",detailDto.getPointCode());
|
||||
mp.put("区域编码",detailDto.getRegionCode());
|
||||
mp.put("区域名称",detailDto.getRegionName());
|
||||
mp.put("子托号",detailDto.getSubTray());
|
||||
mp.put("母拖号",detailDto.getMotherTray());
|
||||
@@ -205,9 +217,30 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
mp.put("入库时间",detailDto.getUpdateTime());
|
||||
mp.put("棒源等级",detailDto.getSiliconGrade());
|
||||
mp.put("客户来料批次号",detailDto.getIngotBatch());
|
||||
mp.put("回温时间",detailDto.getStandingTime());
|
||||
mp.put("已回温时间",detailDto.getUsedTime());
|
||||
mp.put("数量",detailDto.getNumber());
|
||||
mp.put("每托数量(根)",detailDto.getNumber());
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void queryHwInPendingDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
|
||||
pageQuery.setSize(99999);
|
||||
IPage<HwDto> pages = this.queryHwInPending(query,pageQuery);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for(HwDto detailDto:pages.getRecords()){
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("待入库点位编码",detailDto.getPointCode());
|
||||
mp.put("待入库区域名称",detailDto.getRegionName());
|
||||
mp.put("子托号",detailDto.getSubTray());
|
||||
mp.put("母拖号",detailDto.getMotherTray());
|
||||
mp.put("物料名称",detailDto.getProductDescription());
|
||||
mp.put("供应商名称",detailDto.getSupplierName());
|
||||
mp.put("棒源等级",detailDto.getSiliconGrade());
|
||||
mp.put("客户来料批次号",detailDto.getIngotBatch());
|
||||
mp.put("每托数量(根)",detailDto.getNumber());
|
||||
mp.put("更新时间",detailDto.getUpdateTime());
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
@@ -221,9 +254,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
for(HwDto detailDto:pages.getRecords()){
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("点位编码",detailDto.getPointCode());
|
||||
mp.put("点位名称",detailDto.getPointCode());
|
||||
mp.put("区域编码",detailDto.getRegionCode());
|
||||
mp.put("区域名称",detailDto.getRegionName());
|
||||
mp.put("目的点位编码",detailDto.getPointCode2());
|
||||
mp.put("目的区域名称",detailDto.getRegionName2());
|
||||
mp.put("子托号",detailDto.getSubTray());
|
||||
mp.put("母拖号",detailDto.getMotherTray());
|
||||
mp.put("物料名称",detailDto.getProductDescription());
|
||||
@@ -233,7 +266,32 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
mp.put("客户来料批次号",detailDto.getIngotBatch());
|
||||
mp.put("回温时间",detailDto.getStandingTime());
|
||||
mp.put("已回温时间",detailDto.getUsedTime());
|
||||
mp.put("数量",detailDto.getNumber());
|
||||
mp.put("每托数量(根)",detailDto.getNumber());
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void queryHwOutPendingDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
|
||||
pageQuery.setSize(99999);
|
||||
IPage<HwDto> pages = this.queryHwOutPending(query,pageQuery);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for(HwDto detailDto:pages.getRecords()){
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("待出库点位编码",detailDto.getPointCode());
|
||||
mp.put("待出库区域编码",detailDto.getRegionName());
|
||||
mp.put("目的点位编码",detailDto.getPointCode2());
|
||||
mp.put("目的区域名称",detailDto.getRegionName2());
|
||||
mp.put("子托号",detailDto.getSubTray());
|
||||
mp.put("母拖号",detailDto.getMotherTray());
|
||||
mp.put("物料名称",detailDto.getProductDescription());
|
||||
mp.put("供应商名称",detailDto.getSupplierName());
|
||||
mp.put("入库时间",detailDto.getUpdateTime());
|
||||
mp.put("棒源等级",detailDto.getSiliconGrade());
|
||||
mp.put("客户来料批次号",detailDto.getIngotBatch());
|
||||
mp.put("已回温时间",detailDto.getUsedTime());
|
||||
mp.put("每托数量(根)",detailDto.getNumber());
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -161,18 +162,12 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
|
||||
@Override
|
||||
public void create(SchBaseTask entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
Assert.notNull(entity.getTask_status(), "任务状态不能为空!");
|
||||
|
||||
entity.setTask_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setTask_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setCreate_id(currentUserId);
|
||||
entity.setCreate_name(nickName);
|
||||
entity.setCreate_time(now);
|
||||
entity.setUpdate_id(currentUserId);
|
||||
entity.setUpdate_name(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
schBaseTaskMapper.insert(entity);
|
||||
|
||||
@@ -278,11 +273,12 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理端一键移库
|
||||
* 管理端一键移库:原材料缓存区---》原材料库存区
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void move() {
|
||||
log.info("管理端发起一键移库!");
|
||||
List<SchBasePoint> schBasePointList = schBasePointService.list(new LambdaQueryWrapper<SchBasePoint>()
|
||||
@@ -311,7 +307,7 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
param.put("request_medthod_code", "POINTTask");
|
||||
param.put("request_medthod_name", "点对点任务");
|
||||
param.put("device_code", param.getString("start_point"));
|
||||
BaseResponse baseResponse = acsToWmsService.acsApply(param);
|
||||
acsToWmsService.pdaApply(param);
|
||||
nextList.remove(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.database.material.service.IMdBaseMaterialService;
|
||||
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
|
||||
import org.nl.wms.ext.service.dto.to.BaseResponse;
|
||||
@@ -190,7 +191,7 @@ public abstract class AbstractTask {
|
||||
if (taskConfig.getIs_check_workorder()) {
|
||||
// 校验工单
|
||||
// 根据对接位的父点位编码(设备)找到工单设备
|
||||
SchBasePoint one = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
/*SchBasePoint one = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getPoint_code, pointObj.getParent_point_code()));
|
||||
// 查找当前设备、生产中
|
||||
PdmBdWorkorder workorder = workorderService.getOne(new LambdaQueryWrapper<PdmBdWorkorder>()
|
||||
@@ -203,7 +204,7 @@ public abstract class AbstractTask {
|
||||
.eq(MdBaseMaterial::getMaterial_id,workorder.getMaterial_id()));
|
||||
param.put("workorder_code", workorder.getWorkorder_code()); // 静置时间
|
||||
// 设置任务数据
|
||||
task.setVehicle_type(workorder.getVehicle_type());
|
||||
task.setVehicle_type(workorder.getVehicle_type());*/
|
||||
}
|
||||
// 校验是否需要自动agv
|
||||
if (!pointObj.getIs_auto()) {
|
||||
@@ -212,22 +213,36 @@ public abstract class AbstractTask {
|
||||
}
|
||||
// 2、创建申请任务
|
||||
task.setAcs_trace_id(param.getString("acs_trace_id"));
|
||||
//设置任务类型
|
||||
task.setConfig_code(config_code);
|
||||
//设置任务创建模式
|
||||
task.setCreate_mode(param.getString("create_mode"));
|
||||
//记录母载具号
|
||||
task.setVehicle_code(param.getString("vehicle_code"));
|
||||
//记录子载具号
|
||||
task.setVehicle_code2(param.getString("vehicle_code2"));
|
||||
task.setVehicle_qty(param.getInteger("vehicle_qty"));
|
||||
task.setVehicle_type(param.getString("material_type"));
|
||||
//设置任务状态为 申请状态(当前任务参数不全,不具备下发条件)
|
||||
task.setTask_status(TaskStatus.APPLY.getCode());
|
||||
task.setWorkshop_code(taskConfig.getWorkshop_code()); // 车间编码
|
||||
// 设置起/终点
|
||||
this.setTaskPoint(taskConfig, task, apply_point_code,param);
|
||||
task.setExt_group_data(JSONObject.toJSONString(param));
|
||||
//设置操作人
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
if(ObjectUtil.isNotEmpty(param.getString("user_id"))){
|
||||
currentUserId = param.getString("user_id");
|
||||
nickName = param.getString("person_name");
|
||||
}
|
||||
task.setRemark("任务申请");
|
||||
task.setCreate_id(currentUserId);
|
||||
task.setCreate_name(nickName);
|
||||
task.setUpdate_id(currentUserId);
|
||||
task.setUpdate_name(nickName);
|
||||
taskService.create(task);
|
||||
|
||||
// 3、判断是否直接找点下发
|
||||
// if (taskConfig.getIs_immediate_create()) {
|
||||
// this.create();
|
||||
// }
|
||||
}
|
||||
|
||||
public void updateTaskStatus(String task_code, TaskStatus status) {
|
||||
|
||||
@@ -39,10 +39,6 @@ public class AutoCreateTask {
|
||||
// 调用AbstractAcsTask类的每个子类的schedule()方法
|
||||
try {
|
||||
Object obj = SpringContextHolder.getBean(clz);
|
||||
// if (ObjectUtil.isEmpty(obj)) { // 如果spring中获取不到,就用newInstance创建
|
||||
// obj = clz.newInstance();
|
||||
// }
|
||||
//Method m = obj.getClass().getDeclaredMethod("schedule");
|
||||
Method m = obj.getClass().getMethod("schedule");
|
||||
m.invoke(obj);
|
||||
} catch (InvocationTargetException e) {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
package org.nl.wms.sch.task_manage;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.wms.sch.workorder.service.IWorkorderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AutoCreateWorkOrderTask {
|
||||
|
||||
@Autowired
|
||||
private IWorkorderService workorderService;
|
||||
|
||||
@SneakyThrows
|
||||
public void run() {
|
||||
log.info("定时任务AutoCreateWorkOrderTask开始执行:");
|
||||
this.doExecute();
|
||||
log.info("定时任务AutoCreateWorkOrderTask执行结束:");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据工单下发情况自动生成工单出库任务
|
||||
*/
|
||||
private void doExecute() {
|
||||
workorderService.batchCreateTask();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.sch.task_manage.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Author: zds
|
||||
* @Description: 出库工单状态枚举
|
||||
* @Date: 2023/6/16
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WorkOrderTwoStatusEnum {
|
||||
UNPRODUCED(0, "未提交"),
|
||||
ISSUED(1, "已提交"),
|
||||
PRODUCING(2, "出库中"),
|
||||
COMPLETE(3, "已出库");
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.ext.service.WmsToAcsService;
|
||||
import org.nl.wms.ext.service.dto.to.BaseResponse;
|
||||
import org.nl.wms.pdm.service.IPdmBdWorkorderService;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
@@ -24,6 +23,7 @@ import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
|
||||
import org.nl.wms.sch.task_manage.task.TaskType;
|
||||
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||
import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper;
|
||||
import org.nl.wms.sch.workorder.service.IWorkorderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -52,7 +52,7 @@ public class POINTTask extends AbstractTask {
|
||||
@Autowired
|
||||
private ISchBaseTaskconfigService taskConfigService;
|
||||
@Autowired
|
||||
private IPdmBdWorkorderService workorderService;
|
||||
private IWorkorderService workorderService;
|
||||
@Autowired
|
||||
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
|
||||
@Autowired
|
||||
@@ -90,7 +90,11 @@ public class POINTTask extends AbstractTask {
|
||||
pointService.update(schBasePoint);
|
||||
nextSchBasePoint.setIng_task_code(task.getTask_code());
|
||||
pointService.update(nextSchBasePoint);
|
||||
|
||||
//去回温库的任务,更细工单表
|
||||
if(nextSchBasePoint.getPoint_code().contains("XHW")){
|
||||
//pdm_bd_workorder_two任务完成时,status改为2出库中
|
||||
workorderService.update(schBasePoint.getVehicle_code2(),"2");
|
||||
}
|
||||
//下发
|
||||
this.renotifyAcs(task);
|
||||
}
|
||||
@@ -161,6 +165,10 @@ public class POINTTask extends AbstractTask {
|
||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode2)
|
||||
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
||||
GroupBindMaterialStatusEnum.BOUND.getValue()));
|
||||
if(endPointObj.getPoint_code().contains("XHW")){
|
||||
//pdm_bd_workorder_two任务完成时,status改为3
|
||||
workorderService.update(vehicleCode2,"3");
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(one)) {
|
||||
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.nl.wms.ext.service.dto.to.BaseResponse;
|
||||
import org.nl.wms.mes.domain.Head;
|
||||
import org.nl.wms.mes.domain.QPMES065Request;
|
||||
import org.nl.wms.mes.domain.QPMES065RequestBody;
|
||||
import org.nl.wms.pdm.service.IPdmBdWorkorderService;
|
||||
import org.nl.wms.sch.data.service.dao.mapper.MaterialDataMapper;
|
||||
import org.nl.wms.sch.data.service.dto.MaterialDataDto;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
@@ -33,6 +32,7 @@ import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
|
||||
import org.nl.wms.sch.task_manage.task.TaskType;
|
||||
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||
import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper;
|
||||
import org.nl.wms.sch.workorder.service.IWorkorderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -66,7 +66,7 @@ public class YCLCKTask extends AbstractTask {
|
||||
@Autowired
|
||||
private ISchBaseTaskconfigService taskConfigService;
|
||||
@Autowired
|
||||
private IPdmBdWorkorderService workorderService;
|
||||
private IWorkorderService workorderService;
|
||||
@Autowired
|
||||
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
|
||||
@Autowired
|
||||
@@ -82,7 +82,6 @@ public class YCLCKTask extends AbstractTask {
|
||||
protected void create() throws BadRequestException {
|
||||
// 获取任务
|
||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||
|
||||
for (SchBaseTask task : tasks) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(task.getExt_group_data());
|
||||
String region;
|
||||
@@ -102,10 +101,10 @@ public class YCLCKTask extends AbstractTask {
|
||||
log.info("原材料出库未找到所需点位!");
|
||||
continue;
|
||||
}
|
||||
// 设置起点并修改创建成功状态
|
||||
// 设置终点并修改创建成功状态
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
task.setRemark("");
|
||||
task.setRemark("任务下发");
|
||||
SchBasePoint schBasePoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getPoint_code, task.getPoint_code1()));
|
||||
task.setVehicle_code(schBasePoint.getVehicle_code());
|
||||
@@ -114,10 +113,9 @@ public class YCLCKTask extends AbstractTask {
|
||||
|
||||
//发起任务时先把点位占用,防止发起重复任务
|
||||
point.setIng_task_code(task.getTask_code());
|
||||
// point.setVehicle_qty(point.getVehicle_qty() - 1);
|
||||
// point.setVehicle_type(materialType);
|
||||
pointService.update(point);
|
||||
|
||||
//pdm_bd_workorder_two任务下发时,status改为2
|
||||
workorderService.update(schBasePoint.getVehicle_code2(),"2");
|
||||
//下发
|
||||
this.renotifyAcs(task);
|
||||
}
|
||||
@@ -230,6 +228,9 @@ public class YCLCKTask extends AbstractTask {
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setGroup_id(ObjectUtil.isNotEmpty(one)?one.getGroup_id():null);
|
||||
taskObj.setRemark("任务完成");
|
||||
//pdm_bd_workorder_two任务完成时,status改为3
|
||||
workorderService.update(vehicleCode2,"3");
|
||||
|
||||
List<Material> materialList = materialMapper.selectList(new LambdaQueryWrapper<Material>()
|
||||
.eq(Material::getPalletSN, taskObj.getVehicle_code2())
|
||||
.eq(Material::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue()));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.sch.workorder.controller.controller;
|
||||
package org.nl.wms.sch.workorder.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -6,9 +6,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.sch.workorder.controller.service.IWorkorderService;
|
||||
import org.nl.wms.sch.workorder.controller.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.controller.service.dto.WorkorderQuery;
|
||||
import org.nl.wms.pdm.service.dao.PointDetailAdd;
|
||||
import org.nl.wms.sch.workorder.service.IWorkorderService;
|
||||
import org.nl.wms.sch.workorder.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.service.dto.WorkorderQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -58,4 +59,13 @@ public class WorkorderController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/batchChange")
|
||||
@Log("批量更新工单状态")
|
||||
@ApiOperation("批量更新工单状态")
|
||||
public ResponseEntity<Object> batchChange(@RequestBody PointDetailAdd pointDetailAdd){
|
||||
log.info("批量新增原材料出库任务:"+pointDetailAdd.toString());
|
||||
workorderService.batchChange(pointDetailAdd);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.nl.wms.sch.workorder.controller.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.sch.workorder.controller.service.dao.Workorder;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-16
|
||||
**/
|
||||
public interface WorkorderMapper extends BaseMapper<Workorder> {
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package org.nl.wms.sch.workorder.controller.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.sch.workorder.controller.service.IWorkorderService;
|
||||
import org.nl.wms.sch.workorder.controller.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.controller.service.dao.mapper.WorkorderMapper;
|
||||
import org.nl.wms.sch.workorder.controller.service.dto.WorkorderQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder> implements IWorkorderService {
|
||||
|
||||
@Autowired
|
||||
private WorkorderMapper workorderMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Workorder> queryAll(WorkorderQuery whereJson, PageQuery page){
|
||||
IPage<Workorder> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
LambdaQueryWrapper<Workorder> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getMoname()), Workorder::getMoname,whereJson.getMoname());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getSomtOrderNo()), Workorder::getSomtOrderNo,whereJson.getSomtOrderNo());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getPalletSN()), Workorder::getPalletSN,whereJson.getPalletSN());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getLotSN()), Workorder::getLotSN,whereJson.getLotSN());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getProductName()), Workorder::getProductName,whereJson.getProductName());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getSupplierCode()), Workorder::getSupplierCode,whereJson.getSupplierCode());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getProductDescription()), Workorder::getProductDescription,whereJson.getProductDescription());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getStatus()), Workorder::getStatus,whereJson.getStatus());
|
||||
pages = workorderMapper.selectPage(pages, wrapper);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(Workorder entity) {
|
||||
workorderMapper.insert(entity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
workorderMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package org.nl.wms.sch.workorder.controller.service;
|
||||
package org.nl.wms.sch.workorder.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.sch.workorder.controller.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.controller.service.dto.WorkorderQuery;
|
||||
import org.nl.wms.pdm.service.dao.PointDetailAdd;
|
||||
import org.nl.wms.sch.workorder.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.service.dto.WorkorderQuery;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -25,10 +26,28 @@ public interface IWorkorderService extends IService<Workorder> {
|
||||
*/
|
||||
void create(Workorder entity);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param palletSN
|
||||
* @param status
|
||||
*/
|
||||
public void update(String palletSN,String status);
|
||||
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
|
||||
/**
|
||||
* 批量更新工单状态
|
||||
* @param pointDetailAdd
|
||||
*/
|
||||
void batchChange( PointDetailAdd pointDetailAdd);
|
||||
|
||||
/**
|
||||
* 批量生成工单出库任务
|
||||
*/
|
||||
void batchCreateTask();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.sch.workorder.controller.service.dao;
|
||||
package org.nl.wms.sch.workorder.service.dao;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
@@ -38,6 +38,8 @@ public class Workorder implements Serializable {
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
@ApiModelProperty(value = "回温模式")
|
||||
private String mode;
|
||||
|
||||
public void copyFrom(QPMES155RequestBody source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.nl.wms.sch.workorder.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YCLKCDto;
|
||||
import org.nl.wms.sch.workorder.service.dao.Workorder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-16
|
||||
**/
|
||||
public interface WorkorderMapper extends BaseMapper<Workorder> {
|
||||
|
||||
void batchChange(List<String> pointCodes,String mode,String status);
|
||||
|
||||
List<YCLKCDto> getYlOutDetail();
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?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="org.nl.wms.sch.workorder.service.dao.mapper.WorkorderMapper">
|
||||
<update id="batchChange">
|
||||
UPDATE pdm_bd_workorder_two
|
||||
SET status = #{status},
|
||||
mode = #{mode}
|
||||
<where>
|
||||
palletSN IN
|
||||
<foreach collection="pointCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
and status != #{status}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<select id="getYlOutDetail" resultType="org.nl.wms.sch.report.service.dto.YCLKCDto">
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.region_name AS regionName,
|
||||
p.vehicle_code2 AS subTray,
|
||||
p.vehicle_code AS motherTray,
|
||||
ANY_VALUE (t.somtOrderNo) AS somtOrderNo,
|
||||
ANY_VALUE (t.moname) AS moname,
|
||||
ANY_VALUE (t.status) AS status,
|
||||
ANY_VALUE (t.mode) AS mode,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
|
||||
ANY_VALUE ( m2.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m2.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
|
||||
ANY_VALUE ( m2.number ) AS number
|
||||
FROM
|
||||
pdm_bd_workorder_two t
|
||||
LEFT JOIN sch_base_point p ON t.palletSN = p.vehicle_code2
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON t.palletSN = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND t.STATUS = '1'
|
||||
AND p.region_code IN ( 'YL','YLHC','KJHC' )
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY point_code ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.sch.workorder.controller.service.dto;
|
||||
package org.nl.wms.sch.workorder.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -22,4 +22,6 @@ public class WorkorderDto implements Serializable {
|
||||
private String supplierCode;
|
||||
//客户名称
|
||||
private String supplierName;
|
||||
//回温模式
|
||||
private String mode;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.sch.workorder.controller.service.dto;
|
||||
package org.nl.wms.sch.workorder.service.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -23,4 +23,6 @@ public class WorkorderQuery implements Serializable {
|
||||
private String moname;
|
||||
//出库单号
|
||||
private String somtOrderNo;
|
||||
//回温模式
|
||||
private String mode;
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package org.nl.wms.sch.workorder.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.pda.service.PdaService;
|
||||
import org.nl.wms.pdm.service.dao.PointDetailAdd;
|
||||
import org.nl.wms.sch.report.service.dto.YCLKCDto;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.nl.wms.sch.task_manage.enums.WorkOrderTwoStatusEnum;
|
||||
import org.nl.wms.sch.workorder.service.IWorkorderService;
|
||||
import org.nl.wms.sch.workorder.service.dao.Workorder;
|
||||
import org.nl.wms.sch.workorder.service.dao.mapper.WorkorderMapper;
|
||||
import org.nl.wms.sch.workorder.service.dto.WorkorderQuery;
|
||||
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;
|
||||
import java.util.Set;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder> implements IWorkorderService {
|
||||
|
||||
@Autowired
|
||||
private WorkorderMapper workorderMapper;
|
||||
@Autowired
|
||||
private ISchBaseTaskconfigService taskConfigService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
|
||||
@Override
|
||||
public IPage<Workorder> queryAll(WorkorderQuery whereJson, PageQuery page){
|
||||
IPage<Workorder> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
LambdaQueryWrapper<Workorder> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getMoname()), Workorder::getMoname,whereJson.getMoname());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getSomtOrderNo()), Workorder::getSomtOrderNo,whereJson.getSomtOrderNo());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getPalletSN()), Workorder::getPalletSN,whereJson.getPalletSN());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getLotSN()), Workorder::getLotSN,whereJson.getLotSN());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getProductName()), Workorder::getProductName,whereJson.getProductName());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getSupplierCode()), Workorder::getSupplierCode,whereJson.getSupplierCode());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getProductDescription()), Workorder::getProductDescription,whereJson.getProductDescription());
|
||||
wrapper.like(StringUtils.isNotBlank(whereJson.getStatus()), Workorder::getStatus,whereJson.getStatus());
|
||||
pages = workorderMapper.selectPage(pages, wrapper);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(Workorder entity) {
|
||||
workorderMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String palletSN,String status){
|
||||
if(ObjectUtil.isNotEmpty(palletSN)){
|
||||
//更新已生成任务后的工单状态
|
||||
UpdateWrapper<Workorder> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("palletSN",palletSN);
|
||||
updateWrapper.ge("status","1");
|
||||
updateWrapper.set("status",status);
|
||||
workorderMapper.update(null,updateWrapper);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
workorderMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchChange( PointDetailAdd pointDetailAdd){
|
||||
//载具号集合
|
||||
List<String> pointCodes = pointDetailAdd.getPointCodes();
|
||||
//是否快速回温
|
||||
String mode = pointDetailAdd.getMode();
|
||||
//下发状态
|
||||
String status = pointDetailAdd.getStatus();
|
||||
//更新工单状态和回温模式
|
||||
workorderMapper.batchChange(pointCodes,mode,status);
|
||||
}
|
||||
@Override
|
||||
//@Transactional(rollbackFor = Exception.class)
|
||||
public void batchCreateTask(){
|
||||
String config_code = "YCLCKTask";
|
||||
//查询可生成任务的工单
|
||||
List<YCLKCDto> list = workorderMapper.getYlOutDetail();
|
||||
if(list.size()>0){
|
||||
// 查询任务配置信息
|
||||
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
|
||||
.eq(SchBaseTaskconfig::getConfig_code, config_code));
|
||||
Assert.notNull(taskConfig, "找不到任务配置文件,请确认YCLCKTask配置是否存在!");
|
||||
// 获取任务配置最大生成任务数
|
||||
Integer tcmn = taskConfig.getTask_create_max_num();
|
||||
// 获取执行中的任务
|
||||
List<SchBaseTask> unFinishTasksByTaskConfig = new ArrayList<SchBaseTask>();
|
||||
JSONObject param=new JSONObject();
|
||||
for(YCLKCDto workorder : list){
|
||||
//子载具
|
||||
String vehicle_code2 = workorder.getSubTray();
|
||||
//母载具
|
||||
String vehicle_code = workorder.getMotherTray();
|
||||
//载具所在点位
|
||||
String point_code = workorder.getPointCode();
|
||||
//是否快速回温
|
||||
String mode = workorder.getMode();
|
||||
// 获取执行中的任务
|
||||
unFinishTasksByTaskConfig = taskService.findUnFinishTasksByTaskConfig(config_code);
|
||||
//执行中任务数量小于最大可生成任务数
|
||||
if(unFinishTasksByTaskConfig.size() < tcmn){
|
||||
//设置出库任务参数
|
||||
param.put("start_point",point_code);
|
||||
param.put("mode",mode);
|
||||
param.put("vehicle_code",vehicle_code);
|
||||
param.put("vehicle_code2", vehicle_code2);
|
||||
param.put("user_id","1");
|
||||
param.put("person_name", "管理员");
|
||||
pdaService.yclck(param);
|
||||
//更新对应载具工单状态为已生成任务,不可在工单页面取消
|
||||
//pdm_bd_workorder_two任务生成时,status改为2
|
||||
this.update(vehicle_code2,"2");
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,11 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:gc_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:stand_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:stand_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
# password: ${DB_PWD:P@ssw0rd}
|
||||
password: ${DB_PWD:root}
|
||||
# password: ${DB_PWD:P@ssw0rd}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
@@ -148,7 +148,7 @@ sa-token:
|
||||
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
||||
is-read-cookie: true
|
||||
is-print: false
|
||||
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
||||
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
||||
token-session-check-login: false
|
||||
alone-redis:
|
||||
# Redis数据库索引(默认为0)
|
||||
|
||||
Reference in New Issue
Block a user