feat: 报表
This commit is contained in:
@@ -31,14 +31,12 @@ public class DasQualityInspectionController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询质检记录")
|
||||
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(dasQualityInspectionService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增质检记录")
|
||||
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody DasQualityInspection entity) {
|
||||
dasQualityInspectionService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
@@ -46,14 +44,12 @@ public class DasQualityInspectionController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改质检记录")
|
||||
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody DasQualityInspection entity) {
|
||||
dasQualityInspectionService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除质检记录")
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
dasQualityInspectionService.deleteAll(ids);
|
||||
|
||||
@@ -80,4 +80,6 @@ public class MdBaseBrickInfo implements Serializable {
|
||||
|
||||
private String workorder_code;
|
||||
|
||||
private String record_time;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.database.brick.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -43,6 +44,7 @@ public class MdBaseBrickInfoServiceImpl extends ServiceImpl<MdBaseBrickInfoMappe
|
||||
@Override
|
||||
public IPage<MdBaseBrickInfo> queryAll(Map whereJson, PageQuery page) {
|
||||
LambdaQueryWrapper<MdBaseBrickInfo> lam = new LambdaQueryWrapper<>();
|
||||
lam.orderByDesc(MdBaseBrickInfo::getRecord_time);
|
||||
IPage<MdBaseBrickInfo> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
mdBaseBrickInfoMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
@@ -124,6 +126,7 @@ public class MdBaseBrickInfoServiceImpl extends ServiceImpl<MdBaseBrickInfoMappe
|
||||
brickInfo.setFlatness(dto.getFlatness());
|
||||
brickInfo.setUnqualified_qty(dto.getUnqualified_qty());
|
||||
brickInfo.setIs_group(false);
|
||||
brickInfo.setRecord_time(DateUtil.now());
|
||||
return brickInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -953,7 +953,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
? schBasePoint.getPoint_status()
|
||||
: PointStatusEnum.EMPTY_POINT.getCode();
|
||||
if ((pointStatus.equals(PointStatusEnum.FULL_POINT.getCode())
|
||||
&& move.equals(PointStatusEnum.EMPTY_VEHICLE.getCode())) || (pointStatus.equals(move))) {
|
||||
&& move.equals(PointStatusEnum.EMPTY_VEHICLE.getCode()))
|
||||
|| (pointStatus.equals(move))) {
|
||||
return BaseResponse.responseOk(actionRequest.getRequestNo());
|
||||
}
|
||||
// 载具类型不为空,并且不是0的情况,lmsVehicleTypeShift:转成lms的载具类型
|
||||
@@ -969,6 +970,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
PointUtils.setUpdateByAcs(schBasePoint);
|
||||
pointService.updateById(schBasePoint);
|
||||
// hint: 特殊处理
|
||||
specialOperation(schBasePoint);
|
||||
log.info("点位" + schBasePoint.getPoint_code() + "更新之后:{}", schBasePoint);
|
||||
}
|
||||
} finally {
|
||||
@@ -979,6 +982,23 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
return BaseResponse.responseOk(actionRequest.getRequestNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊处理 此处直接针对入窑口02有货解绑入窑口01
|
||||
* @param schBasePoint /
|
||||
*/
|
||||
private void specialOperation(SchBasePoint schBasePoint) {
|
||||
if ( ObjectUtil.isNotEmpty(schBasePoint)
|
||||
&& "RYK02".equals(schBasePoint.getPoint_code())
|
||||
&& PointStatusEnum.EMPTY_VEHICLE.getCode().equals(schBasePoint.getPoint_status())) {
|
||||
// 解锁入窑口01
|
||||
SchBasePoint endPointObj = new SchBasePoint();
|
||||
endPointObj.setIng_task_code("");
|
||||
PointUtils.setUpdateByAcs(endPointObj);
|
||||
pointService.update(endPointObj, new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getPoint_code, "RYK01"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse applyOneCloth(JSONObject param) {
|
||||
// mark: 上传mes数据
|
||||
|
||||
@@ -52,4 +52,6 @@ public class PdmBdProductionProcessTracking implements Serializable {
|
||||
private String half_material_code;
|
||||
@TableField(exist = false)
|
||||
private String raw_material_code;
|
||||
@TableField(exist = false)
|
||||
private String material_qty;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
vg.vehicle_code,
|
||||
p.point_name,
|
||||
vg.pcsn,
|
||||
vg.material_qty,
|
||||
w.point_code AS device_code,
|
||||
m.material_code,
|
||||
m.material_name,
|
||||
@@ -29,7 +30,9 @@
|
||||
<if test="query.begin_time != null">
|
||||
AND pt.record_time <![CDATA[>=]]> #{query.begin_time}
|
||||
</if>
|
||||
AND pt.buss_move_id IS NOT NULL
|
||||
AND vg.group_id IS NOT NULL
|
||||
</where>
|
||||
ORDER BY pt.buss_move_id, pt.record_time
|
||||
ORDER BY pt.buss_move_id DESC, pt.record_time
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -39,28 +39,24 @@ public class ReportController {
|
||||
|
||||
@GetMapping("/inventoryAlert")
|
||||
@Log("库存物料提示记录表")
|
||||
|
||||
public ResponseEntity<Object> inventoryAlert(JSONObject json, PageQuery page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/intoKilnReport")
|
||||
@Log("入窑记录报表")
|
||||
|
||||
public ResponseEntity<Object> intoKilnReport(Map json, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.intoKilnReport(json, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/outKilnReport")
|
||||
@Log("出窑窑记录报表")
|
||||
|
||||
public ResponseEntity<Object> outKilnReport(Map json, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.outKilnReport(json, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/inKilnReport")
|
||||
@Log("窑内物料实时报表")
|
||||
|
||||
public ResponseEntity<Object> inKilnReport(Map json, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.inKilnReport(json, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -12,13 +12,43 @@ import org.nl.wms.report.service.dao.vo.MaterialTimeoutVo;
|
||||
* @Date: 2023/7/21
|
||||
*/
|
||||
public interface ReportMapper {
|
||||
/**
|
||||
* 入窑记录
|
||||
* @param pages /
|
||||
* @param query /
|
||||
* @return /
|
||||
*/
|
||||
IPage<IOKilnReportVo> intoKilnReportByPage(IPage<IOKilnReportVo> pages, JSONObject query);
|
||||
|
||||
/**
|
||||
* 出窑记录
|
||||
* @param pages /
|
||||
* @param object /
|
||||
* @return /
|
||||
*/
|
||||
IPage<IOKilnReportVo> outKilnReportByPage(IPage<IOKilnReportVo> pages, JSONObject object);
|
||||
|
||||
/**
|
||||
* 窑内数据
|
||||
* @param pages /
|
||||
* @param object /
|
||||
* @return /
|
||||
*/
|
||||
IPage<IOKilnReportVo> inKilnReport(IPage<IOKilnReportVo> pages, JSONObject object);
|
||||
|
||||
/**
|
||||
* 物料警告
|
||||
* @param pages /
|
||||
* @param object /
|
||||
* @return /
|
||||
*/
|
||||
IPage<MaterialTimeoutVo> inventoryMaterialTimeoutWarning(IPage<MaterialTimeoutVo> pages, JSONObject object);
|
||||
|
||||
/**
|
||||
* 滚筒线报表
|
||||
* @param pages /
|
||||
* @param blurry /
|
||||
* @return /
|
||||
*/
|
||||
IPage<InsideDrumLineVo> insideDrumLineReport(IPage<InsideDrumLineVo> pages, String blurry);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
FROM `sch_base_vehiclematerialgroup` vg
|
||||
LEFT JOIN md_base_material m ON m.material_id = vg.material_id
|
||||
WHERE vg.into_kiln_time IS NOT NULL
|
||||
AND vg.group_bind_material_status = '2'
|
||||
ORDER BY vg.into_kiln_time DESC
|
||||
</select>
|
||||
<select id="outKilnReportByPage" resultType="org.nl.wms.report.service.dao.vo.IOKilnReportVo">
|
||||
SELECT vg.into_kiln_time,
|
||||
@@ -26,7 +26,7 @@
|
||||
LEFT JOIN md_base_material m ON m.material_id = vg.material_id
|
||||
WHERE vg.into_kiln_time IS NOT NULL
|
||||
AND vg.out_kiln_time IS NOT NULL
|
||||
AND vg.group_bind_material_status = '2'
|
||||
ORDER BY vg.out_kiln_time DESC
|
||||
</select>
|
||||
<select id="inKilnReport" resultType="org.nl.wms.report.service.dao.vo.IOKilnReportVo">
|
||||
SELECT vg.into_kiln_time,
|
||||
@@ -40,6 +40,7 @@
|
||||
WHERE vg.into_kiln_time IS NOT NULL
|
||||
AND vg.out_kiln_time IS NULL
|
||||
AND vg.group_bind_material_status = '2'
|
||||
ORDER BY vg.into_kiln_time DESC
|
||||
</select>
|
||||
<select id="inventoryMaterialTimeoutWarning"
|
||||
resultType="org.nl.wms.report.service.dao.vo.MaterialTimeoutVo">
|
||||
@@ -48,7 +49,7 @@
|
||||
p.region_name,
|
||||
ma.material_code,
|
||||
ma.material_name,
|
||||
vg.instorage_time
|
||||
vg.update_time
|
||||
FROM `sch_base_point` p
|
||||
LEFT JOIN sch_base_vehiclematerialgroup vg ON vg.vehicle_code = p.vehicle_code
|
||||
AND vg.vehicle_type = p.vehicle_type AND vg.group_bind_material_status = '2'
|
||||
@@ -56,12 +57,14 @@
|
||||
WHERE p.region_code = 'GTPHC'
|
||||
AND p.point_type = '2'
|
||||
AND p.point_status = '3'
|
||||
AND vg.instorage_time <![CDATA[<=]]> DATE_SUB(NOW(), INTERVAL 30 DAY)
|
||||
AND vg.update_time <![CDATA[<=]]> DATE_SUB(NOW(), INTERVAL 30 DAY)
|
||||
ORDER BY p.point_code
|
||||
</select>
|
||||
<select id="insideDrumLineReport" resultType="org.nl.wms.report.service.dao.vo.InsideDrumLineVo">
|
||||
SELECT vg.vehicle_code,
|
||||
vg.pcsn,
|
||||
vg.material_qty,
|
||||
vg.instorage_time,
|
||||
m.material_code,
|
||||
m.material_name
|
||||
FROM `sch_base_vehiclematerialgroup` vg
|
||||
@@ -71,6 +74,6 @@
|
||||
<if test="blurry != null">
|
||||
AND m.material_code LIKE '%${blurry}%'
|
||||
</if>
|
||||
ORDER BY vg.update_time DESC
|
||||
ORDER BY vg.instorage_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -14,4 +14,5 @@ public class InsideDrumLineVo {
|
||||
private String material_qty;
|
||||
private String material_code;
|
||||
private String material_name;
|
||||
private String instorage_time;
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ public class MaterialTimeoutVo {
|
||||
private String region_name;
|
||||
private String material_code;
|
||||
private String material_name;
|
||||
private String instorage_time;
|
||||
private String update_time;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,6 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
}
|
||||
entity.setVehicle_type("");
|
||||
entity.setVehicle_code("");
|
||||
entity.setVehicle_qty(0);
|
||||
}
|
||||
pointMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@@ -69,8 +69,7 @@ public class HCSSXMLTask extends AbstractTask {
|
||||
task.setRemark("入窑口未找到所需点位!");
|
||||
taskService.updateById(task);
|
||||
// 消息通知
|
||||
noticeService.createNotice(task.getTask_code() + " - " + task.getRemark(),
|
||||
task.getConfig_code() + task.getTask_code(),
|
||||
noticeService.createNotice(task.getRemark(), task.getConfig_code() + task.getTask_code(),
|
||||
NoticeTypeEnum.WARN.getCode());
|
||||
continue;
|
||||
}
|
||||
@@ -140,10 +139,7 @@ public class HCSSXMLTask extends AbstractTask {
|
||||
String endPoint = taskObj.getPoint_code2();
|
||||
SchBasePoint endPointObj = pointService.selectByIdLock(endPoint);
|
||||
if (ObjectUtil.isNotEmpty(endPointObj)) {
|
||||
// 终点解锁
|
||||
endPointObj.setIng_task_code("");
|
||||
PointUtils.setUpdateByType(endPointObj, taskFinishedType);
|
||||
pointService.updateById(endPointObj);
|
||||
// update: 终点解锁 - 解锁由入窑口02上报有货修改
|
||||
}
|
||||
// 任务完成
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
`sch_base_point` p
|
||||
LEFT JOIN sch_base_point p2 ON p2.point_code = p.parent_point_code
|
||||
WHERE p.point_type = '1'
|
||||
AND p.point_status = '1'
|
||||
AND p2.point_status = '1'
|
||||
AND p2.is_used = true
|
||||
AND (p.ing_task_code = '' OR p.ing_task_code IS NULL)
|
||||
|
||||
@@ -319,13 +319,13 @@ public class YZSLTask extends AbstractTask {
|
||||
bdWorkorder.setReal_qty(NumberUtil.add(realQty, materialQty));
|
||||
TaskUtils.setWorkOrderUpdateByType(bdWorkorder, taskFinishedType);
|
||||
workorderService.updateById(bdWorkorder);
|
||||
// 终点解锁
|
||||
endPointObj.setIng_task_code("");
|
||||
PointUtils.setUpdateByType(endPointObj, taskFinishedType);
|
||||
// 终点解锁 - 工单不加急
|
||||
if (!bdWorkorder.getIs_urgent()) {
|
||||
endPointObj.setIng_task_code("");
|
||||
PointUtils.setUpdateByType(endPointObj, taskFinishedType);
|
||||
PointUtils.clearPointAndRetainNum(endPointObj);
|
||||
pointService.updateById(endPointObj);
|
||||
}
|
||||
pointService.updateById(endPointObj);
|
||||
}
|
||||
// 任务完成
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
|
||||
@@ -27,7 +27,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
@@ -173,4 +176,14 @@ public class test {
|
||||
System.out.println(proOrder.getWorkorder_code() + " - " + proOrder.getWorkorder_status());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void testVariableParameter() {
|
||||
this.test01("www", "eee");
|
||||
}
|
||||
|
||||
public void test01(String... ags) {
|
||||
List<String> collect = Arrays.stream(ags).collect(Collectors.toList());
|
||||
System.out.println(collect);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user