From e512f702d3d8f914e5bcc50e6355292cd5edd2fb Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 7 Nov 2024 17:04:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=9B=E5=BB=BA=E5=B7=A1=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/api/controller/ApiController.java | 3 ++ .../java/com/ruoyi/api/mapper/ApiMapper.java | 2 + .../ruoyi/api/service/impl/ApiService.java | 4 ++ .../ruoyi/api/service/impl/TaskService.java | 38 +++++++++++++++++++ .../src/main/resources/mapper/ApiMapper.xml | 16 +++++++- .../ruoyi/manage/domain/RecordInspection.java | 11 +++++- .../manage/mapper/RecordInspectionMapper.java | 2 + .../service/IRecordInspectionService.java | 2 + .../impl/RecordInspectionServiceImpl.java | 2 + .../mapper/manage/RecordInspectionMapper.xml | 9 ++++- 10 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 ruoyi-api/src/main/java/com/ruoyi/api/service/impl/TaskService.java diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java index e3326d0..6c81cf5 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java @@ -262,6 +262,9 @@ public class ApiController { return success("创建成功", insertNumber); } + + + /** * 轮挡报废 * @param epc diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java b/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java index 11e431f..652bf15 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java @@ -74,4 +74,6 @@ public interface ApiMapper { @Param("epc") String epc, @Param("user") String user, @Param("pathName") String pathName); + + List selectLocationFromLedger(); } diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java index 38122db..984eb17 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java @@ -128,4 +128,8 @@ public class ApiService { public void insertBfImg(Long objid, String epc, String user, String pathName) { mapper.insertBfImg(objid,epc,user, pathName); } + + public List selectLocationFromLedger() { + return mapper.selectLocationFromLedger(); + } } diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/TaskService.java b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/TaskService.java new file mode 100644 index 0000000..89b9675 --- /dev/null +++ b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/TaskService.java @@ -0,0 +1,38 @@ +package com.ruoyi.api.service.impl; + +import com.ruoyi.api.domain.CheckTaskInfo; +import com.ruoyi.api.mapper.ApiMapper; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.manage.domain.RecordInspection; +import com.ruoyi.manage.mapper.RecordInspectionMapper; +import com.ruoyi.manage.service.IRecordInspectionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +@Component("TaskService") +public class TaskService { + + @Autowired + private ApiMapper mapper; + @Autowired + private RecordInspectionMapper recordInspectionMapper; + + //定时任务创建巡检单 + public void inspectionCreate(){ + System.out.println("创建成功"); + int number=recordInspectionMapper.countInsertRecordNumber(); + number++; + RecordInspection recordInspection = new RecordInspection(); + recordInspection.setInspectionCode(DateUtils.parseDateToStr("yyyyMMdd",new Date())+"00"+number); + System.out.println(); + //插入主表 + int insertNumber = recordInspectionMapper.insertRecordInspection(recordInspection); + List list = mapper.selectLocationFromLedger(); + mapper.insertCheckTask(Math.toIntExact(recordInspection.getInspectionId()), list); + } +} diff --git a/ruoyi-api/src/main/resources/mapper/ApiMapper.xml b/ruoyi-api/src/main/resources/mapper/ApiMapper.xml index 066798a..3688efd 100644 --- a/ruoyi-api/src/main/resources/mapper/ApiMapper.xml +++ b/ruoyi-api/src/main/resources/mapper/ApiMapper.xml @@ -222,8 +222,7 @@ rit.inspection_id from record_inspection_task rit right join record_inspection ri on rit.inspection_id = ri.inspection_id - where task_state = '待完成' - and inspection_user = #{user} + where inspection_user = #{user} + select lr.location_code, + bs.store_name, + bs.store_id + from ledger_rfid lr + left join base_location bl on lr.location_code = bl.location_code + left join base_store bs on bl.store_id = bs.store_id + where lr.location_type = 2 + and is_scrap = 1 + group by bl.location_code + order by bl.location_code + \ No newline at end of file diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspection.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspection.java index 3b1f5de..c4ba9f9 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspection.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspection.java @@ -25,6 +25,7 @@ public class RecordInspection extends BaseEntity @Excel(name = "巡检时间", width = 30, dateFormat = "yyyy-MM-dd") private Date inspectionTime; + private String inspectionCode; /** 巡检人 */ @Excel(name = "巡检人") private String inspectionUser; @@ -34,7 +35,15 @@ public class RecordInspection extends BaseEntity private int abnormalNumber; private int skipNumber; - public void setInspectionId(Long inspectionId) + public String getInspectionCode() { + return inspectionCode; + } + + public void setInspectionCode(String inspectionCode) { + this.inspectionCode = inspectionCode; + } + + public void setInspectionId(Long inspectionId) { this.inspectionId = inspectionId; } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionMapper.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionMapper.java index a36eabd..e104b9c 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionMapper.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionMapper.java @@ -59,4 +59,6 @@ public interface RecordInspectionMapper * @return 结果 */ public int deleteRecordInspectionByInspectionIds(String[] inspectionIds); + + int countInsertRecordNumber(); } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionService.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionService.java index 6356fea..30dda54 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionService.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionService.java @@ -58,4 +58,6 @@ public interface IRecordInspectionService * @return 结果 */ public int deleteRecordInspectionByInspectionId(Long inspectionId); + + } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionServiceImpl.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionServiceImpl.java index 3b53a2d..7567d85 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionServiceImpl.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionServiceImpl.java @@ -92,4 +92,6 @@ public class RecordInspectionServiceImpl implements IRecordInspectionService { infoMapper.deleteRecordInspectionInfoByInspectionId(inspectionId); return recordInspectionMapper.deleteRecordInspectionByInspectionId(inspectionId); } + + } diff --git a/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionMapper.xml b/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionMapper.xml index 756c04f..0b50270 100644 --- a/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionMapper.xml +++ b/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionMapper.xml @@ -8,6 +8,7 @@ + @@ -48,11 +49,11 @@ insert into record_inspection inspection_time, - inspection_user, + inspection_code, #{inspectionTime}, - #{inspectionUser}, + #{inspectionCode}, @@ -78,4 +79,8 @@ + + \ No newline at end of file From 26e38e002f87822c31242eb182a1c38ebd7a6b0c Mon Sep 17 00:00:00 2001 From: wanghao Date: Fri, 8 Nov 2024 13:51:37 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/api/controller/ApiController.java | 56 ++++++++++++------- .../java/com/ruoyi/api/mapper/ApiMapper.java | 16 +++++- .../ruoyi/api/service/impl/ApiService.java | 20 +++++-- .../src/main/resources/mapper/ApiMapper.xml | 28 ++++++++-- 4 files changed, 85 insertions(+), 35 deletions(-) diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java index 6c81cf5..bc5715c 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java @@ -173,7 +173,6 @@ public class ApiController { private IRecordInvalidatedService recordInvalidatedService; - @PostMapping("/xj/selectLite") public String xjSelectLite(String user) { List list = apiService.xjSelect(user); @@ -186,13 +185,21 @@ public class ApiController { @Autowired private IRecordInspectionService inspectionService; + @PostMapping("/inspection/skipTask") + public AjaxResult inspectionSubmit(long tableId, String remark) { + apiService.updataInspectionTaskByObjid(tableId,remark,"跳过"); + return success(); + } + @PostMapping("/xj/submit") - public AjaxResult inspectionSubmit(long tableId, String json, long inspectionId, String user,List files) { + public AjaxResult inspectionSubmit(long tableId, String json, long inspectionId, String user, List files) { //插入 info 表 List list = JSONObject.parseArray(json, StockDto.class); + String locationCode = list.get(0).getLocationCode(); + apiService.deleteInspectionInfo(locationCode, inspectionId); apiService.insertInspectionInfo(list, inspectionId); //修改task状态 - apiService.updataInspectionTaskByObjid(tableId); + apiService.updataInspectionTaskByObjid(tableId,null,"已完成"); //存储图片,插库 String filePath = RuoYiConfig.getUploadPath() + "/inspection"; @@ -205,7 +212,8 @@ public class ApiController { e.printStackTrace(); } System.out.println("上传图片路径:" + pathName); - apiService.insertInspetionPictrue(inspectionId, tableId,user, pathName); + + apiService.insertInspetionPictrue(inspectionId, tableId, user, pathName, locationCode); } } @@ -213,20 +221,6 @@ public class ApiController { } - /** - * 查询巡检机位 - * - * @param user - * @return - */ - @PostMapping("/inspection/selectTask") - public AjaxResult inspectionSelectTask(String user) { - List list = apiService.inspectionSelectTask(user); - if (list == null || list.isEmpty()) { - return error("需要创建"); - } - return success(list); - } /** * 根据机位查询轮挡 @@ -263,17 +257,37 @@ public class ApiController { } - + /** + * 查询巡检机位 + * + * @return + */ + @PostMapping("/inspection/selectTask") + public AjaxResult inspectionSelectTask(@RequestParam(value = "state", defaultValue = "") String state) { + try { + int inspectionid = apiService.selectCodeFromRecode(); + System.out.println(inspectionid + "-" + state); + List list = apiService.inspectionSelectTask(state, inspectionid); + // if (list == null || list.isEmpty()) { + // return error("需要领用轮挡到机位"); + // } + return success(list); + } catch (Exception e) { + e.printStackTrace(); + return error("需要创建"); + } + } /** * 轮挡报废 + * * @param epc * @param user * @param remark * @return */ @PostMapping("/bf/submit") - public AjaxResult bfSubmit(String epc, String reason,String user, String remark,List files) { + public AjaxResult bfSubmit(String epc, String reason, String user, String remark, List files) { //插入记录 RecordInvalidated recordInvalidated = new RecordInvalidated(); recordInvalidated.setEpc(epc); @@ -296,7 +310,7 @@ public class ApiController { e.printStackTrace(); } System.out.println("上传图片路径:" + pathName); - apiService.insertBfImg(recordInvalidated.getObjid(),epc,user, pathName); + apiService.insertBfImg(recordInvalidated.getObjid(), epc, user, pathName); } } diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java b/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java index 652bf15..29c1dd3 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/mapper/ApiMapper.java @@ -59,16 +59,22 @@ public interface ApiMapper { void insertCheckTask(@Param("id") int id,@Param("list") List list); - List inspectionSelectTask(String user); + List inspectionSelectTask(@Param("state") String state, + @Param("id")int id); List inspectionSelectLocation(String code); - void updataInspectionTaskByObjid(long tableId); + void updataInspectionTaskByObjid( @Param("tableId")long tableId, + @Param("remark") String remark, + @Param("state") String state + ); void insertInspetionPictrue(@Param("inspetionId") long inspectionId, @Param("tableId") long tableId, @Param("user") String user, - @Param("pathName") String pathName); + @Param("pathName") String pathName, + @Param("locationCode") String locationCode + ); void insertBfImg(@Param("objid") Long objid, @Param("epc") String epc, @@ -76,4 +82,8 @@ public interface ApiMapper { @Param("pathName") String pathName); List selectLocationFromLedger(); + + int selectCodeFromRecode(); + + void deleteInspectionInfo(@Param("inspectionId") long inspectionId,@Param("locationCode") String locationCode); } diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java index 984eb17..0774801 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/ApiService.java @@ -109,20 +109,20 @@ public class ApiService { mapper.insertCheckTask(id, list); } - public List inspectionSelectTask(String user) { - return mapper.inspectionSelectTask(user); + public List inspectionSelectTask(String state,int id) { + return mapper.inspectionSelectTask(state,id); } public List inspectionSelectLocation(String code) { return mapper.inspectionSelectLocation(code); } - public void updataInspectionTaskByObjid(long tableId) { - mapper.updataInspectionTaskByObjid(tableId); + public void updataInspectionTaskByObjid(long tableId, String remark,String state) { + mapper.updataInspectionTaskByObjid(tableId,remark,state); } - public void insertInspetionPictrue(long inspectionId, long tableId, String user, String pathName) { - mapper.insertInspetionPictrue(inspectionId, tableId,user, pathName); + public void insertInspetionPictrue(long inspectionId, long tableId, String user, String pathName,String locationCode) { + mapper.insertInspetionPictrue(inspectionId, tableId,user, pathName,locationCode); } public void insertBfImg(Long objid, String epc, String user, String pathName) { @@ -132,4 +132,12 @@ public class ApiService { public List selectLocationFromLedger() { return mapper.selectLocationFromLedger(); } + + public int selectCodeFromRecode() { + return mapper.selectCodeFromRecode(); + } + + public void deleteInspectionInfo(String locationCode, long inspectionId) { + mapper.deleteInspectionInfo(inspectionId,locationCode); + } } diff --git a/ruoyi-api/src/main/resources/mapper/ApiMapper.xml b/ruoyi-api/src/main/resources/mapper/ApiMapper.xml index 3688efd..a7dcec5 100644 --- a/ruoyi-api/src/main/resources/mapper/ApiMapper.xml +++ b/ruoyi-api/src/main/resources/mapper/ApiMapper.xml @@ -192,6 +192,7 @@ + @@ -221,8 +222,14 @@ task_state, rit.inspection_id from record_inspection_task rit - right join record_inspection ri on rit.inspection_id = ri.inspection_id - where inspection_user = #{user} + + + inspection_id=#{id} + + AND task_state = #{state} + + + - UPDATE record_inspection_task SET task_state = '完成' WHERE objid = #{tableId}; + UPDATE record_inspection_task SET task_state = #{state},remark = #{remark} WHERE objid = #{tableId}; - INSERT INTO record_inspection_img (inspection_id, task_id, img_path, create_by) - VALUES (#{inspetionId},#{tableId}, #{pathName}, #{user}); + INSERT INTO record_inspection_img (inspection_id, task_id, img_path, create_by,location_code) + VALUES (#{inspetionId},#{tableId}, #{pathName}, #{user},#{locationCode}); @@ -262,4 +269,15 @@ group by bl.location_code order by bl.location_code + + + + delete from bg_wheel_chocks.record_inspection_info where inspection_id = #{inspectionId} and location_code =#{locationCode} + \ No newline at end of file From 83015c3e60949b6468ddc895963d76b5c92a78a1 Mon Sep 17 00:00:00 2001 From: wanghao Date: Fri, 8 Nov 2024 15:59:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/api/controller/ApiController.java | 13 +- .../src/main/resources/mapper/ApiMapper.xml | 3 +- .../RecordInvalidatedController.java | 2 +- .../manage/domain/RecordInvalidated.java | 40 ++- .../mapper/RecordInvalidatedMapper.java | 2 +- .../service/IRecordInvalidatedService.java | 2 +- .../impl/RecordInvalidatedServiceImpl.java | 6 +- .../mapper/manage/RecordInvalidatedMapper.xml | 20 +- .../manage/record_invalidated/add.html | 20 ++ .../manage/record_invalidated/edit.html | 20 ++ .../record_invalidated.html | 243 +++++++++--------- 11 files changed, 221 insertions(+), 150 deletions(-) diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java index bc5715c..52bd975 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/ApiController.java @@ -187,7 +187,7 @@ public class ApiController { @PostMapping("/inspection/skipTask") public AjaxResult inspectionSubmit(long tableId, String remark) { - apiService.updataInspectionTaskByObjid(tableId,remark,"跳过"); + apiService.updataInspectionTaskByObjid(tableId, remark, "跳过"); return success(); } @@ -199,7 +199,7 @@ public class ApiController { apiService.deleteInspectionInfo(locationCode, inspectionId); apiService.insertInspectionInfo(list, inspectionId); //修改task状态 - apiService.updataInspectionTaskByObjid(tableId,null,"已完成"); + apiService.updataInspectionTaskByObjid(tableId, null, "已完成"); //存储图片,插库 String filePath = RuoYiConfig.getUploadPath() + "/inspection"; @@ -287,18 +287,17 @@ public class ApiController { * @return */ @PostMapping("/bf/submit") - public AjaxResult bfSubmit(String epc, String reason, String user, String remark, List files) { + public AjaxResult bfSubmit(String epc, String reason, String user, int type, String remark, List files) { //插入记录 RecordInvalidated recordInvalidated = new RecordInvalidated(); + recordInvalidated.setReason(reason); recordInvalidated.setEpc(epc); recordInvalidated.setCreateBy(user); recordInvalidated.setRemark(remark); + recordInvalidated.setTypeName(Long.valueOf(type)); recordInvalidatedService.insertRecordInvalidated(recordInvalidated); - // - //修改台账 - apiService.updataLedgerForBf(epc, "2"); - + apiService.updataLedgerForBf(epc, type+""); //存储图片,插库 String filePath = RuoYiConfig.getUploadPath() + "/inspection"; if (files != null && files.size() > 0) { diff --git a/ruoyi-api/src/main/resources/mapper/ApiMapper.xml b/ruoyi-api/src/main/resources/mapper/ApiMapper.xml index a7dcec5..687fa1d 100644 --- a/ruoyi-api/src/main/resources/mapper/ApiMapper.xml +++ b/ruoyi-api/src/main/resources/mapper/ApiMapper.xml @@ -5,7 +5,7 @@ @@ -59,6 +59,7 @@ SET location_type = '2', location_code = #{outStoreDto.areaCode}, + is_scrap =1, update_time = now() WHERE rifd_code =#{epc} diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInvalidatedController.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInvalidatedController.java index 696a2f0..b5486c0 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInvalidatedController.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInvalidatedController.java @@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * 轮挡报废记录Controller * * @author wangh - * @date 2024-01-26 + * @date 2024-11-08 */ @Controller @RequestMapping("/manage/record_invalidated") diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInvalidated.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInvalidated.java index c7ee98b..6b627e0 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInvalidated.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInvalidated.java @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * 轮挡报废记录对象 record_invalidated * * @author wangh - * @date 2024-01-26 + * @date 2024-11-08 */ public class RecordInvalidated extends BaseEntity { @@ -22,18 +22,15 @@ public class RecordInvalidated extends BaseEntity @Excel(name = "RFID") private String epc; + /** 异常类型 */ + @Excel(name = "异常类型") + private Long typeName; + + /** 原因 */ + @Excel(name = "原因") private String reason; - - public String getReason() { - return reason; - } - - public void setReason(String reason) { - this.reason = reason; - } - - public void setObjid(Long objid) + public void setObjid(Long objid) { this.objid = objid; } @@ -51,12 +48,33 @@ public class RecordInvalidated extends BaseEntity { return epc; } + public void setTypeName(Long typeName) + { + this.typeName = typeName; + } + + public Long getTypeName() + { + return typeName; + } + public void setReason(String reason) + { + this.reason = reason; + } + + public String getReason() + { + return reason; + } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("objid", getObjid()) .append("epc", getEpc()) + .append("typeName", getTypeName()) + .append("reason", getReason()) + .append("remark", getRemark()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .toString(); diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInvalidatedMapper.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInvalidatedMapper.java index 0b1f8b3..90d350c 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInvalidatedMapper.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInvalidatedMapper.java @@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository; * 轮挡报废记录Mapper接口 * * @author wangh - * @date 2024-01-26 + * @date 2024-11-08 */ @Repository public interface RecordInvalidatedMapper diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInvalidatedService.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInvalidatedService.java index 81af1c4..0b2b14c 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInvalidatedService.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInvalidatedService.java @@ -7,7 +7,7 @@ import com.ruoyi.manage.domain.RecordInvalidated; * 轮挡报废记录Service接口 * * @author wangh - * @date 2024-01-26 + * @date 2024-11-08 */ public interface IRecordInvalidatedService { diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInvalidatedServiceImpl.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInvalidatedServiceImpl.java index 9bbcb1a..dccc481 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInvalidatedServiceImpl.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInvalidatedServiceImpl.java @@ -16,7 +16,7 @@ import com.ruoyi.common.core.text.Convert; * 轮挡报废记录Service业务层处理 * * @author wangh - * @date 2024-01-26 + * @date 2024-11-08 */ @Service public class RecordInvalidatedServiceImpl implements IRecordInvalidatedService { @@ -53,6 +53,10 @@ public class RecordInvalidatedServiceImpl implements IRecordInvalidatedService { */ @Override public int insertRecordInvalidated(RecordInvalidated recordInvalidated) { + + // if (recordInvalidated.getCreateBy()==null){ + // recordInvalidated.setCreateBy(ShiroUtils.getLoginName()); + // } recordInvalidated.setCreateTime(DateUtils.getNowDate()); return recordInvalidatedMapper.insertRecordInvalidated(recordInvalidated); } diff --git a/ruoyi-manage/src/main/resources/mapper/manage/RecordInvalidatedMapper.xml b/ruoyi-manage/src/main/resources/mapper/manage/RecordInvalidatedMapper.xml index 8723136..f70f9ef 100644 --- a/ruoyi-manage/src/main/resources/mapper/manage/RecordInvalidatedMapper.xml +++ b/ruoyi-manage/src/main/resources/mapper/manage/RecordInvalidatedMapper.xml @@ -7,21 +7,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + + - select objid, epc, create_by, create_time,reason,remark from record_invalidated + select objid, epc, type_name, reason, remark, create_by, create_time from record_invalidated @@ -35,15 +36,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into record_invalidated epc, + type_name, + reason, + remark, create_by, create_time, - remark, #{epc}, + #{typeName}, + #{reason}, + #{remark}, #{createBy}, #{createTime}, - #{remark }, @@ -51,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update record_invalidated epc = #{epc}, + type_name = #{typeName}, + reason = #{reason}, + remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/add.html b/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/add.html index 393e61f..c3d5aef 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/add.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/add.html @@ -12,6 +12,26 @@ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/edit.html b/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/edit.html index 2ae2e49..4d5cb2c 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/edit.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/edit.html @@ -13,6 +13,26 @@ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/record_invalidated.html b/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/record_invalidated.html index a8c58ac..e3e1e38 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/record_invalidated.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_invalidated/record_invalidated.html @@ -1,87 +1,84 @@ - + -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
+
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
- -
-
- - + initinspectionTable = function (index, row, $detail) { + var childTable = $detail.html('
').find('table'); + + $(childTable).bootstrapTable({ + url: ctx + "manage/record_invalidated_img/list", + method: 'post', + sidePagination: "server", + contentType: "application/x-www-form-urlencoded", + queryParams: { + invalidatedId: row.objid + }, + columns: [ + { + title: '序号', + formatter: function (value, row, index) { + return index+1 + } + }, + { + field: 'epc', + title: 'RFID' + }, + { + field: 'imgPath', + title: '图片', + formatter: function (value, row, index) { + return $.table.imageView(value, 818, 460, null); + + } + }, + { + field: 'createBy', + title: '创建人' + }, + ] + }); + }; + \ No newline at end of file From 28da293f80c17b99fa0a6290d2d0821f1296f5c1 Mon Sep 17 00:00:00 2001 From: wanghao Date: Mon, 11 Nov 2024 17:41:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/img/folder.png | Bin 0 -> 3198 bytes .../RecordInspectionImgController.java | 18 ++- .../manage/domain/RecordInspectionImg.java | 16 +- .../mapper/RecordInspectionImgMapper.java | 4 +- .../service/IRecordInspectionImgService.java | 4 +- .../impl/RecordInspectionImgServiceImpl.java | 8 +- .../manage/RecordInspectionImgMapper.xml | 18 ++- .../manage/record_inspection_img/add.html | 23 ++- .../manage/record_inspection_img/edit.html | 29 +++- .../record_inspection_img.html | 18 ++- .../record_inspection_location.html | 143 ++++++++++++++++++ 11 files changed, 270 insertions(+), 11 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/static/img/folder.png create mode 100644 ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_location.html diff --git a/ruoyi-admin/src/main/resources/static/img/folder.png b/ruoyi-admin/src/main/resources/static/img/folder.png new file mode 100644 index 0000000000000000000000000000000000000000..9746cf8d2a122ceff275fc043f61f23e27c0fc56 GIT binary patch literal 3198 zcmeHK`%}`17XN}^hM6z&v8kx!)h$%)_VR^a(|l|SYPD)9GFU!#EiyGU(WHm@#BI~G z)s)Q2ZYff_X`o_>-dkQ})3j97#Yc(>u9OIpEIV`mhkIvkKb`ZL`OKL!pL5P<=H!Rq z{q+#vAOHZ+3k>iL0|1C7g#bF*nh0GtE=aXsD3s)LhDuA9##6F8WilGkl-8WmFQ*ZuB^0Sd za{JJlHE7)cUO#{Cvaz)Rf@fq9fMEhg*C?q_1aIsABgpzTXQhXI%H?j<6;3U$%2VG2 zHMucRKy9nyW$S*b174w6IBZ;}>TRB=)#3FqLpG^%@}E~JNQdbd7o>jA%*-)<&!$Gc z4>OS7qstuMv(F@yXl(eXk`_8Jy6fx--;9i8@vk+1SPQOzci|xu9_R7M*|K16MLhQ& zuhDELVdpS~bJ>vo99p~$%#f`R{0&FmX4%N4<-EzeRZ%fXG?FYkddU__u@MA7O1+{x zY+tpOoI}A2R!sT1rx%s!wRhbd1VNCb`h^nw|TS+OnHs-i+xz0hgc- z7oU(bwgjIspRwVrpW&kljy$Up2o*uYKhl-(rbLCgVX_Y^W=J-9kZE!JL=snh9tXRR z4(SBWSaC1~E42$2l4@<(tF<_G@?!b+^q>8AAnRj*Z1v>I=-O%UHH6zx5)M!n*N7Pk zVRBNka(JDCEihN^VgkxVVdY@%E8T+6V;v)v*D`-7ha*ALH;$qY{M?4=XfytnFWW+Z zFP|lE6WwD6s?mjmsu>b1hog*w3(8Jr9SI5l`QxGmg2@{9^!)gXXs97x{t2cpt;&JU z#S8rB1=87iBsoV!%Cm#S8 zZpP^96IH+G-Lr2w+l0<^SWYjU4G!&o+wPzR7rdNNZp>#Kw(aQ<$YU+v?Wg}38?Go5 zHT}_B=@tsvW9RBHVD9cko)CFwY?uDl3M!5U-F$$&)~Jp(F8Lk^cG&vn?>8F@BUE?1 zFQBDwxI7;hkLG_INDw|vLp1k-^rhBHF^Dd4%8Tp} zjFf!5?M-6w==OenUWou=im`Wq&$XY+zY5TCh%NsvjySgfAbAwRJM*VC<_pvF3|o-& z9jPnP3&Yq@-b%xY)fk@e(Ru!IVYavqkC515E$JE3&X)9ny)7M+oNS2d%&c!;`oC(F z1ba|!P>;q^XIX`_`)PIkXt60zxXYd#0U6rd)egIFhmGe`3fL&tt>JdocpV^~Zz~5Y zp$KMhR=jaSBnWA?$eG^UtdVwfh`Nt{Q!|OzkOS5K4GPH`L6VJHvKQHK$0M2+a1i)U z&MC&m>A@f*LK~W|X-%|Tj0Yj_AYZ{(4gQz+K(oqI9WCyn*9 zZ*z7z-pPs4I`brPTrujXF=N(b8@Bqnc3 z?=Nzt;0*IRcJu#Bxkd`NQ%-8S)6;TVN# z+urIo<0Al3Z8TfcnR?74bL72?f^00EGl%JLiKLn3a`MJ#N+Fe)nsx+RoTa@i)-4+w zuqYG~qD|dV#P>soFKnd`L497{a9OWEQOFLS4tC!|1X$a;+IumKTmCTyvy#1`cnhmj zeLpB?Jxjp-@B-Uf8jienJ@3v5viwH5sg(1;zUF)RW8k@Y(L list = recordInspectionImgService.selectRecordInspectionImgList(recordInspectionImg); return getDataTable(list); } + @RequiresPermissions("manage:record_inspection_img:list") + @PostMapping("/locationList") + @ResponseBody + public TableDataInfo locationList(RecordInspectionImg recordInspectionImg) + { + startPage(); + List list = recordInspectionImgService.selectRecordInspectionlocationList(recordInspectionImg); + return getDataTable(list); + } /** * 导出巡检历史图片列表 diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspectionImg.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspectionImg.java index 19a19a7..29aebfd 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspectionImg.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordInspectionImg.java @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * 巡检历史图片对象 record_inspection_img * * @author wangh - * @date 2024-09-27 + * @date 2024-11-11 */ public class RecordInspectionImg extends BaseEntity { @@ -23,6 +23,10 @@ public class RecordInspectionImg extends BaseEntity @Excel(name = "任务表id") private Long taskId; + /** 机位码 */ + @Excel(name = "机位码") + private String locationCode; + /** 路径 */ @Excel(name = "路径") private String imgPath; @@ -45,6 +49,15 @@ public class RecordInspectionImg extends BaseEntity { return taskId; } + public void setLocationCode(String locationCode) + { + this.locationCode = locationCode; + } + + public String getLocationCode() + { + return locationCode; + } public void setImgPath(String imgPath) { this.imgPath = imgPath; @@ -60,6 +73,7 @@ public class RecordInspectionImg extends BaseEntity return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("inspectionId", getInspectionId()) .append("taskId", getTaskId()) + .append("locationCode", getLocationCode()) .append("imgPath", getImgPath()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionImgMapper.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionImgMapper.java index dc12c93..a9e6a75 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionImgMapper.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordInspectionImgMapper.java @@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository; * 巡检历史图片Mapper接口 * * @author wangh - * @date 2024-09-27 + * @date 2024-11-11 */ @Repository public interface RecordInspectionImgMapper @@ -59,4 +59,6 @@ public interface RecordInspectionImgMapper * @return 结果 */ public int deleteRecordInspectionImgByInspectionIds(String[] inspectionIds); + + List selectRecordInspectionlocationList(RecordInspectionImg recordInspectionImg); } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionImgService.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionImgService.java index 425b8ee..ed8721f 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionImgService.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordInspectionImgService.java @@ -7,7 +7,7 @@ import com.ruoyi.manage.domain.RecordInspectionImg; * 巡检历史图片Service接口 * * @author wangh - * @date 2024-09-27 + * @date 2024-11-11 */ public interface IRecordInspectionImgService { @@ -58,4 +58,6 @@ public interface IRecordInspectionImgService * @return 结果 */ public int deleteRecordInspectionImgByInspectionId(Long inspectionId); + + List selectRecordInspectionlocationList(RecordInspectionImg recordInspectionImg); } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionImgServiceImpl.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionImgServiceImpl.java index ae3f4dc..638eca0 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionImgServiceImpl.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordInspectionImgServiceImpl.java @@ -16,7 +16,7 @@ import com.ruoyi.common.core.text.Convert; * 巡检历史图片Service业务层处理 * * @author wangh - * @date 2024-09-27 + * @date 2024-11-11 */ @Service public class RecordInspectionImgServiceImpl implements IRecordInspectionImgService { @@ -57,6 +57,7 @@ public class RecordInspectionImgServiceImpl implements IRecordInspectionImgServi + recordInspectionImg.setCreateBy(ShiroUtils.getLoginName()); recordInspectionImg.setCreateTime(DateUtils.getNowDate()); return recordInspectionImgMapper.insertRecordInspectionImg(recordInspectionImg); @@ -94,4 +95,9 @@ public class RecordInspectionImgServiceImpl implements IRecordInspectionImgServi public int deleteRecordInspectionImgByInspectionId(Long inspectionId) { return recordInspectionImgMapper.deleteRecordInspectionImgByInspectionId(inspectionId); } + + @Override + public List selectRecordInspectionlocationList(RecordInspectionImg recordInspectionImg) { + return recordInspectionImgMapper.selectRecordInspectionlocationList( recordInspectionImg); + } } diff --git a/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionImgMapper.xml b/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionImgMapper.xml index ad53f55..532e836 100644 --- a/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionImgMapper.xml +++ b/ruoyi-manage/src/main/resources/mapper/manage/RecordInspectionImgMapper.xml @@ -7,13 +7,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select inspection_id, task_id, img_path, create_by, create_time from record_inspection_img + select inspection_id, task_id, location_code, img_path, create_by, create_time from record_inspection_img @@ -35,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" inspection_id, task_id, + location_code, img_path, create_by, create_time, @@ -42,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{inspectionId}, #{taskId}, + #{locationCode}, #{imgPath}, #{createBy}, #{createTime}, @@ -52,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update record_inspection_img task_id = #{taskId}, + location_code = #{locationCode}, img_path = #{imgPath}, create_by = #{createBy}, create_time = #{createTime}, @@ -70,4 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + \ No newline at end of file diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/add.html b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/add.html index 52ff8fa..857d689 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/add.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/add.html @@ -2,6 +2,7 @@ +
@@ -18,15 +19,25 @@
+
+ +
+ +
+
- + +
+ +
+ \ No newline at end of file diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/edit.html b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/edit.html index ce93fe2..331e82e 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/edit.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/edit.html @@ -2,6 +2,7 @@ +
@@ -19,15 +20,25 @@
+
+ +
+ +
+
- + +
+ +
+ \ No newline at end of file diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_img.html b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_img.html index f1cdf9e..a7a6a81 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_img.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_img.html @@ -19,8 +19,18 @@
  • - - + + +
  • +
  • + + +
  • +
  • + + + - +
  •  搜索 @@ -75,6 +85,10 @@ field: 'taskId', title: '任务表id' }, + { + field: 'locationCode', + title: '机位码' + }, { field: 'imgPath', title: '路径' diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_location.html b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_location.html new file mode 100644 index 0000000..c9a9618 --- /dev/null +++ b/ruoyi-manage/src/main/resources/templates/manage/record_inspection_img/record_inspection_location.html @@ -0,0 +1,143 @@ + + + + + + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + + + + + + \ No newline at end of file