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 3442d1d..4ce4f94 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 @@ -207,6 +207,7 @@ public class ApiController { List list = JSONObject.parseArray(json, StockDto.class); if (list != null && !list.isEmpty()) { + locationCode=list.get(0).getLocationCode(); apiService.deleteInspectionInfo(locationCode, inspectionId); apiService.insertInspectionInfo(list, inspectionId); } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInspectionController.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInspectionController.java index 74eaf4b..3ef4b4a 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInspectionController.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordInspectionController.java @@ -61,7 +61,6 @@ public class RecordInspectionController extends BaseController { public AjaxResult print(String ids) { System.out.println(ids); List list = recordInspectionService.selectListByids(ids); - List infolist=iRecordInspectionTaskService.selectTaskInfoByInspectionId(ids); Map map=new HashMap(); map.put("list",list); diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordOutController.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordOutController.java index 98bcc3d..3baadf3 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordOutController.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/controller/RecordOutController.java @@ -25,7 +25,7 @@ import com.ruoyi.common.core.page.TableDataInfo; /** * 轮挡出库记录Controller - * + * * @author wangh * @date 2024-01-18 */ @@ -56,13 +56,26 @@ public class RecordOutController extends BaseController @RequiresPermissions("manage:record_out:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(RecordOut recordOut) + public TableDataInfo list(RecordOutSort recordOutSort) { startPage(); - List list = recordOutService.selectRecordOutList(recordOut); + // List list = recordOutService.selectRecordOutList(recordOut); + List list=recordOutService.selectCountRecord(recordOutSort); + return getDataTable(list); + } + @PostMapping("/childList") + @ResponseBody + public TableDataInfo list(RecordOut recordOut) + { + // startPage(); + // List list = recordOutService.selectRecordOutList(recordOut); + List list=recordOutService.selectRecordOutChildList(recordOut); return getDataTable(list); } + + + /** * 分类查询轮挡入库记录列表 */ diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordOutSort.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordOutSort.java index ada8f47..16ea4c0 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordOutSort.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/domain/RecordOutSort.java @@ -1,10 +1,14 @@ package com.ruoyi.manage.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import javax.xml.crypto.Data; +import java.util.Date; + /** * 轮挡出库记录对象 record_out * @@ -14,7 +18,8 @@ import com.ruoyi.common.core.domain.BaseEntity; public class RecordOutSort extends BaseEntity { private static final long serialVersionUID = 1L; - + @JsonFormat(pattern = "yyyy-MM-dd") + private Date createTime; /** 机位码 */ @Excel(name = "机位码") private String locationCode; @@ -37,6 +42,15 @@ public class RecordOutSort extends BaseEntity return recordCount; } + @Override + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public void setRecordCount(int recordCount) { this.recordCount = recordCount; } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordOutMapper.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordOutMapper.java index 927b58e..ebc143a 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordOutMapper.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/mapper/RecordOutMapper.java @@ -77,4 +77,8 @@ public interface RecordOutMapper * @return 轮挡入库记录 */ public List selectByLocationCode(String locationCode); + + List selectCountRecord(RecordOutSort recordOutSort); + + List selectRecordOutChildList(RecordOut recordOut); } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordOutService.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordOutService.java index 095085a..3ba42b0 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordOutService.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/IRecordOutService.java @@ -76,4 +76,8 @@ public interface IRecordOutService * @return 分类轮挡入库记录 */ public List selectByLocationCode(String locationCode); + + List selectRecordOutChildList(RecordOut recordOut); + + List selectCountRecord(RecordOutSort recordOutSort); } diff --git a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordOutServiceImpl.java b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordOutServiceImpl.java index 2005d09..b51a62f 100644 --- a/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordOutServiceImpl.java +++ b/ruoyi-manage/src/main/java/com/ruoyi/manage/service/impl/RecordOutServiceImpl.java @@ -113,4 +113,15 @@ public class RecordOutServiceImpl implements IRecordOutService { public List selectByLocationCode(String locationCode) { return recordOutMapper.selectByLocationCode(locationCode); } + + + @Override + public List selectRecordOutChildList(RecordOut recordOut) { + return recordOutMapper.selectRecordOutChildList(recordOut); + } + + @Override + public List selectCountRecord(RecordOutSort recordOutSort) { + return recordOutMapper.selectCountRecord(recordOutSort); + } } diff --git a/ruoyi-manage/src/main/resources/mapper/manage/RecordInMapper.xml b/ruoyi-manage/src/main/resources/mapper/manage/RecordInMapper.xml index b85bb90..125ffc3 100644 --- a/ruoyi-manage/src/main/resources/mapper/manage/RecordInMapper.xml +++ b/ruoyi-manage/src/main/resources/mapper/manage/RecordInMapper.xml @@ -47,8 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT batch_code, create_time, COUNT(*) AS record_count FROM record_in - and create_time between #{params.beginCheckTime} and #{params.endCheckTime} and batch_code = #{batchCode} - and batch_code = #{batchCode} + + and create_time between #{params.beginCheckTime} and date(#{params.endCheckTime})+1 + + and batch_code = #{batchCode} + and batch_code = #{batchCode} GROUP BY batch_code ORDER BY batch_code diff --git a/ruoyi-manage/src/main/resources/mapper/manage/RecordOutMapper.xml b/ruoyi-manage/src/main/resources/mapper/manage/RecordOutMapper.xml index 02dd07d..5b63934 100644 --- a/ruoyi-manage/src/main/resources/mapper/manage/RecordOutMapper.xml +++ b/ruoyi-manage/src/main/resources/mapper/manage/RecordOutMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -12,13 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + - + + - - select objid, epc_code, location_code, use_user, create_by, create_time from record_out @@ -26,13 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + select date(create_time) as createTime, count(objid) as record_count + from record_out + + + and create_time between #{params.beginCheckTime} and date( #{params.endCheckTime})+1 + + + + group by createTime; + + + + \ No newline at end of file diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_in_sort/record_in_sort.html b/ruoyi-manage/src/main/resources/templates/manage/record_in_sort/record_in_sort.html index f969604..15ac6a6 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_in_sort/record_in_sort.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_in_sort/record_in_sort.html @@ -189,10 +189,10 @@ field: 'epcCode', title: 'RFID编码' }, - // { - // field: 'batchCode', - // title: '批次码' - // }, + { + field: 'batchCode', + title: '批次码' + }, { field: 'recordCount', title: '数量', diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_inspection/print.html b/ruoyi-manage/src/main/resources/templates/manage/record_inspection/print.html index dd72f6c..34531ad 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_inspection/print.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_inspection/print.html @@ -137,7 +137,7 @@
机坪名称: ${data[0].areaName || ''}
机位码: ${data[0].planePosition || ''}
-
完成状态: ${data[0].taskState || ''}
+
巡检状态: ${data[0].taskState || ''}
2 ? `style="width:calc(75% - 2px)"`:''}> diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_inspection/record_inspection.html b/ruoyi-manage/src/main/resources/templates/manage/record_inspection/record_inspection.html index 4254721..5ce9d04 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_inspection/record_inspection.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_inspection/record_inspection.html @@ -184,7 +184,7 @@ var arrays = $.table.selectColumns("inspectionId"); $.modal.open('打印','/manage/record_inspection/printHtml?ids='+arrays.toString(),1200,800); // alert(arrays); - var data = {"ids": arrays.toString()}; + // var data = {"ids": arrays.toString()}; // $.operate.submit(prefix + "/print", "get", "json", data); // $.get(prefix + "/print",data,(e)=>{ // console.log(e) diff --git a/ruoyi-manage/src/main/resources/templates/manage/record_out/record_out.html b/ruoyi-manage/src/main/resources/templates/manage/record_out/record_out.html index 7bb3192..4845505 100644 --- a/ruoyi-manage/src/main/resources/templates/manage/record_out/record_out.html +++ b/ruoyi-manage/src/main/resources/templates/manage/record_out/record_out.html @@ -10,7 +10,7 @@
    -
  • + +
  • + + + - +
  • +
  •  搜索  重置 @@ -65,49 +74,73 @@ removeUrl: prefix + "/remove", exportUrl: prefix + "/export", modalName: "轮挡出库记录", + detailView: true, + onExpandRow: function (index, row, $detail) { + initChildTable(index, row, $detail); + }, sortName:"createTime" , sortOrder: "desc", columns: [{ checkbox: true }, - { - field: 'objid', - title: '主键', - visible: false - }, - { - field: 'epcCode', - title: 'RFID编码' - }, - { - field: 'locationCode', - title: '机位码' - }, - { - field: 'useUser', - title: '领用人' - }, - { - field: 'createBy', - title: '出库人' - }, - { - field: 'createTime', - title: '出库时间' - }, - { - title: '操作', - align: 'center', - formatter: function(value, row, index) { - var actions = []; - actions.push('编辑 '); - actions.push('删除'); - return actions.join(''); - } - }] + { + field: 'createTime', + title: '出库时间' + }, { + field: 'recordCount', + title: '数量' + }, + ] }; $.table.init(options); }); + + initChildTable = function (index, row, $detail) { + var childTable = $detail.html('
    ').find('table'); + + $(childTable).bootstrapTable({ + url: prefix + "/childList", + method: 'post', + sidePagination: "server", + contentType: "application/x-www-form-urlencoded", + queryParams: { + createTime: row.createTime + }, + columns: [ + { + title: '序号', + formatter: function (value, row, index) { + return index+1 + } + }, + { + field: 'objid', + title: '主键', + visible: false + }, + { + field: 'epcCode', + title: 'RFID编码' + }, + { + field: 'locationCode', + title: '机位码' + }, + { + field: 'useUser', + title: '领用人' + }, + { + field: 'createBy', + title: '出库人' + }, + { + field: 'createTime', + title: '出库时间' + }] + }); + }; + \ No newline at end of file