Merge remote-tracking branch 'origin/master'

master
夜笙歌 2 months ago
commit 47c734957e

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -22,7 +22,7 @@
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<i class="fa fa-info-circle" style="color: red;"></i> 勾选数据导出指定列,否则为全部
<!-- <i class="fa fa-info-circle" style="color: red;"></i> 勾选数据导出指定列,否则为全部 -->
<a class="btn btn-warning" onclick="exportSelected()">
<i class="fa fa-download"></i> 导出
</a>

@ -23,7 +23,7 @@
<body class="signin">
<div class="signinpanel">
<div class="row">
<div class="col-sm-7">
<div class="col-sm-5">
<div class="signin-info">
<!-- <div class="logopanel m-b">
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>

@ -173,7 +173,6 @@ public class ApiController {
private IRecordInvalidatedService recordInvalidatedService;
@PostMapping("/xj/selectLite")
public String xjSelectLite(String user) {
List<StockDto> 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<MultipartFile> files) {
public AjaxResult inspectionSubmit(long tableId, String json, long inspectionId, String user, List<MultipartFile> files) {
//插入 info 表
List<StockDto> 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<CheckTaskInfo> list = apiService.inspectionSelectTask(user);
if (list == null || list.isEmpty()) {
return error("需要创建");
}
return success(list);
}
/**
*
@ -262,26 +256,48 @@ public class ApiController {
return success("创建成功", insertNumber);
}
/**
*
*
* @return
*/
@PostMapping("/inspection/selectTask")
public AjaxResult inspectionSelectTask(@RequestParam(value = "state", defaultValue = "") String state) {
try {
int inspectionid = apiService.selectCodeFromRecode();
System.out.println(inspectionid + "-" + state);
List<CheckTaskInfo> 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<MultipartFile> files) {
public AjaxResult bfSubmit(String epc, String reason, String user, int type, String remark, List<MultipartFile> 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) {
@ -293,7 +309,7 @@ public class ApiController {
e.printStackTrace();
}
System.out.println("上传图片路径:" + pathName);
apiService.insertBfImg(recordInvalidated.getObjid(),epc,user, pathName);
apiService.insertBfImg(recordInvalidated.getObjid(), epc, user, pathName);
}
}

@ -59,19 +59,31 @@ public interface ApiMapper {
void insertCheckTask(@Param("id") int id,@Param("list") List<CheckTaskInfo> list);
List<CheckTaskInfo> inspectionSelectTask(String user);
List<CheckTaskInfo> inspectionSelectTask(@Param("state") String state,
@Param("id")int id);
List<StockDto> 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,
@Param("user") String user,
@Param("pathName") String pathName);
List<CheckTaskInfo> selectLocationFromLedger();
int selectCodeFromRecode();
void deleteInspectionInfo(@Param("inspectionId") long inspectionId,@Param("locationCode") String locationCode);
}

@ -109,23 +109,35 @@ public class ApiService {
mapper.insertCheckTask(id, list);
}
public List<CheckTaskInfo> inspectionSelectTask(String user) {
return mapper.inspectionSelectTask(user);
public List<CheckTaskInfo> inspectionSelectTask(String state,int id) {
return mapper.inspectionSelectTask(state,id);
}
public List<StockDto> 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) {
mapper.insertBfImg(objid,epc,user, pathName);
}
public List<CheckTaskInfo> selectLocationFromLedger() {
return mapper.selectLocationFromLedger();
}
public int selectCodeFromRecode() {
return mapper.selectCodeFromRecode();
}
public void deleteInspectionInfo(String locationCode, long inspectionId) {
mapper.deleteInspectionInfo(inspectionId,locationCode);
}
}

@ -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<CheckTaskInfo> list = mapper.selectLocationFromLedger();
mapper.insertCheckTask(Math.toIntExact(recordInspection.getInspectionId()), list);
}
}

@ -5,7 +5,7 @@
<select id="selectLedgerbyEpcForOutStore" resultType="string">
select rifd_code from ledger_rfid where rifd_code = #{epc}
and is_scrap = 1
and is_scrap in (1,4)
and location_type = '1'
limit 1
</select>
@ -59,6 +59,7 @@
SET
location_type = '2',
location_code = #{outStoreDto.areaCode},
is_scrap =1,
update_time = now()
WHERE rifd_code =#{epc}
</update>
@ -192,6 +193,7 @@
<result column="task_state" property="taskState"/>
<result column="objid" property="id"/>
<result column="area_id" property="areaId"/>
<result column="store_id" property="areaId"/>
<result column="inspection_id" property="inspectionId"/>
</resultMap>
@ -221,9 +223,14 @@
task_state,
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_id=#{id}
<if test="state != null and state != '全部'">
AND task_state = #{state}
</if>
</where>
</select>
<select id="inspectionSelectLocation" resultType="com.ruoyi.api.domain.StockDto">
@ -238,16 +245,40 @@
</select>
<!--完成任务-->
<update id="updataInspectionTaskByObjid">
UPDATE record_inspection_task SET task_state = '完成' WHERE objid = #{tableId};
UPDATE record_inspection_task SET task_state = #{state},remark = #{remark} WHERE objid = #{tableId};
</update>
<insert id="insertInspetionPictrue">
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});
</insert>
<insert id="insertBfImg">
INSERT INTO bg_wheel_chocks.record_invalidated_img (invalidated_id, epc, img_path, create_by)
VALUES (#{objid}, #{epc},#{pathName},#{user});
</insert>
<!--查询台账绑定RFID的机位信息-->
<select id="selectLocationFromLedger" resultMap="checkTaskResultMap">
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
</select>
<select id="selectCodeFromRecode" resultType="int">
select inspection_id
from record_inspection
-- where date(inspection_time) = date(now())
order by inspection_time desc
limit 1
</select>
<delete id="deleteInspectionInfo">
delete from bg_wheel_chocks.record_inspection_info where inspection_id = #{inspectionId} and location_code =#{locationCode}
</delete>
</mapper>

@ -1,15 +1,19 @@
package com.ruoyi.manage.controller;
import java.util.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
import com.github.pagehelper.Page;
import com.ruoyi.manage.domain.RecordInSort;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.manage.domain.RecordIn;
@ -30,6 +34,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
public class RecordInController extends BaseController
{
private String prefix = "manage/record_in";
private String prefix2 = "manage/record_in_sort";
@Autowired
private IRecordInService recordInService;
@ -41,7 +47,27 @@ public class RecordInController extends BaseController
return prefix + "/record_in";
}
@RequiresPermissions("manage:record_in_sort:view")
@GetMapping("/record_in_sort")
public String record_in_sort()
{
return prefix2 + "/record_in_sort";
}
/**
*
*/
@RequiresPermissions("manage:record_in:sort_list")
@PostMapping("/sort_BatchCode")
@ResponseBody
public TableDataInfo selectByBatchCode(String batchCode)
{
// startPage();
List<RecordIn> list = recordInService.selectByBatchCode(batchCode);
return getDataTable(list);
}
/**
*
*
*/
@RequiresPermissions("manage:record_in:list")
@ -53,7 +79,47 @@ public class RecordInController extends BaseController
List<RecordIn> list = recordInService.selectRecordInList(recordIn);
return getDataTable(list);
}
// /**
// *
// * 查询轮挡入库记录列表
// */
// @RequiresPermissions("manage:record_in:list")
// @PostMapping("/list1")
// @ResponseBody
//// public ResponseEntity<List<RecordInSort>> searchRecords(
// @RequestParam(value = "batchCode", required = false) String batchCode,
// @RequestParam(value = "params[beginCheckTime]", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime,
// @RequestParam(value = "params[endCheckTime]", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//
// List<RecordInSort> records = recordInService.searchRecordsByDateAndBatchCode(batchCode, startTime, endTime);
// return ResponseEntity.ok(records);
// }
// public ResponseEntity<List<RecordInSort>> searchRecords(
// @RequestParam(value = "batchCode", required = false) String batchCode,
// @RequestParam(value = "params[beginCheckTime]", required = false) String beginCheckTimeStr,
// @RequestParam(value = "params[endCheckTime]", required = false) String endCheckTimeStr) {
//
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
// Date startTime = null;
// Date endTime = null;
//
// try {
// if (beginCheckTimeStr != null && !beginCheckTimeStr.isEmpty()) {
// startTime = dateFormat.parse(beginCheckTimeStr);
// }
// if (endCheckTimeStr != null && !endCheckTimeStr.isEmpty()) {
// endTime = dateFormat.parse(endCheckTimeStr);
// }
// } catch (ParseException e) {
// // Handle parsing exception
// e.printStackTrace();
// // Return an error response or handle it as per your application's requirements
// return ResponseEntity.badRequest().body(null);
// }
//
// List<RecordInSort> records = recordInService.searchRecordsByDateAndBatchCode(batchCode, startTime, endTime);
// return ResponseEntity.ok(records);
// }
/**
*
*/
@ -67,7 +133,31 @@ public class RecordInController extends BaseController
ExcelUtil<RecordIn> util = new ExcelUtil<RecordIn>(RecordIn.class);
return util.exportExcel(list, "轮挡入库记录数据");
}
/**
*
*/
@RequiresPermissions("manage:record_in:sort_list")
@PostMapping("/sort_list")
@ResponseBody
public TableDataInfo sort_list(RecordInSort recordInSort)
{
startPage();
List<RecordInSort> list = recordInService.selectRecordInSortList(recordInSort);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:record_in:export")
@Log(title = "轮挡入库记录", businessType = BusinessType.EXPORT)
@PostMapping("/export_sort")
@ResponseBody
public AjaxResult export_sort(RecordInSort recordInSort)
{
List<RecordInSort> list = recordInService.selectRecordInSortList(recordInSort);
ExcelUtil<RecordInSort> util = new ExcelUtil<RecordInSort>(RecordInSort.class);
return util.exportExcel(list, "轮挡入库分类记录数据");
}
/**
*
*/
@ -124,4 +214,5 @@ public class RecordInController extends BaseController
{
return toAjax(recordInService.deleteRecordInByObjids(ids));
}
}

@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* Controller
*
* @author wangh
* @date 2024-09-27
* @date 2024-11-11
*/
@Controller
@RequestMapping("/manage/record_inspection_img")
@ -36,15 +36,21 @@ public class RecordInspectionImgController extends BaseController
@RequiresPermissions("manage:record_inspection_img:view")
@GetMapping()
public String record_inspection_img()
public String record_inspection_lo()
{
return prefix + "/record_inspection_location";
}
@GetMapping("/img/{location}")
public String record_inspection_img(@PathVariable("location") String location,ModelMap modelMap)
{
modelMap.put("location",location);
return prefix + "/record_inspection_img";
}
/**
*
*/
//@RequiresPermissions("manage:record_inspection_img:list")
@RequiresPermissions("manage:record_inspection_img:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(RecordInspectionImg recordInspectionImg)
@ -53,6 +59,15 @@ public class RecordInspectionImgController extends BaseController
List<RecordInspectionImg> list = recordInspectionImgService.selectRecordInspectionImgList(recordInspectionImg);
return getDataTable(list);
}
@RequiresPermissions("manage:record_inspection_img:list")
@PostMapping("/locationList")
@ResponseBody
public TableDataInfo locationList(RecordInspectionImg recordInspectionImg)
{
startPage();
List<RecordInspectionImg> list = recordInspectionImgService.selectRecordInspectionlocationList(recordInspectionImg);
return getDataTable(list);
}
/**
*

@ -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")

@ -1,6 +1,10 @@
package com.ruoyi.manage.controller;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
import com.ruoyi.manage.domain.RecordOutSort;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -30,7 +34,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
public class RecordOutController extends BaseController
{
private String prefix = "manage/record_out";
private String prefix2 = "manage/record_out_sort";
@Autowired
private IRecordOutService recordOutService;
@ -40,7 +44,12 @@ public class RecordOutController extends BaseController
{
return prefix + "/record_out";
}
@RequiresPermissions("manage:record_out_sort:view")
@GetMapping("/record_out_sort")
public String record_out_sort()
{
return prefix2 + "/record_out_sort";
}
/**
*
*/
@ -51,9 +60,33 @@ public class RecordOutController extends BaseController
{
startPage();
List<RecordOut> list = recordOutService.selectRecordOutList(recordOut);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:record_out:sort_list")
@PostMapping("/sort_list")
@ResponseBody
public TableDataInfo sort_list(RecordOutSort recordOutSort)
{
startPage();
List<RecordOutSort> list = recordOutService.selectRecordOutSortList(recordOutSort);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:record_out:sort_list")
@PostMapping("/sort_LocationCode")
@ResponseBody
public TableDataInfo selectByBatchCode(String locationCode)
{
// startPage();
List<RecordOut> list = recordOutService.selectByLocationCode(locationCode);
return getDataTable(list);
}
/**
*
*/
@ -67,6 +100,15 @@ public class RecordOutController extends BaseController
ExcelUtil<RecordOut> util = new ExcelUtil<RecordOut>(RecordOut.class);
return util.exportExcel(list, "轮挡出库记录数据");
}
@PostMapping("/exportData")
@ResponseBody
public AjaxResult exportData(RecordOutSort recordOutSort)
{
List<RecordOutSort> list = recordOutService.selectRecordOutSortList(recordOutSort);
ExcelUtil<RecordOutSort> util = new ExcelUtil<>(RecordOutSort.class);
return util.exportExcel(list, "机位领用统计");
}
/**
*
@ -124,4 +166,6 @@ public class RecordOutController extends BaseController
{
return toAjax(recordOutService.deleteRecordOutByObjids(ids));
}
}

@ -0,0 +1,82 @@
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 java.util.Date;
/**
* record_in
*
* @author wangh
* @date 2024-01-17
*/
public class RecordInSort extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long objid;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "入库时间" , width = 30, dateFormat = "yyyy-MM-dd")
private Date createTime;
/** 批次码 */
@Excel(name = "批次码")
private String batchCode;
/** 数量 */
@Excel(name = "数量")
public int recordCount;
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
{
return objid;
}
public void setBatchCode(String batchCode)
{
this.batchCode = batchCode;
}
public String getBatchCode()
{
return batchCode;
}
public int getRecordCount() {
return recordCount;
}
public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
// .append("recordCount", getRecordCount())
.append("batchCode", getBatchCode())
// .append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

@ -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;
}

@ -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
{
@ -17,17 +17,30 @@ public class RecordInspectionImg extends BaseEntity
/** 巡检id */
@Excel(name = "巡检id")
private Long objid;
private Long inspectionId;
/** 任务表id */
@Excel(name = "任务表id")
private Long taskId;
/** 机位码 */
@Excel(name = "机位码")
private String locationCode;
/** 路径 */
@Excel(name = "路径")
private String imgPath;
public void setInspectionId(Long inspectionId)
public Long getObjid() {
return objid;
}
public void setObjid(Long objid) {
this.objid = objid;
}
public void setInspectionId(Long inspectionId)
{
this.inspectionId = inspectionId;
}
@ -45,6 +58,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 +82,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())

@ -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;
private String reason;
public String getReason() {
return reason;
}
/** 异常类型 */
@Excel(name = "异常类型")
private Long typeName;
public void setReason(String reason) {
this.reason = reason;
}
/** 原因 */
@Excel(name = "原因")
private String 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();

@ -0,0 +1,51 @@
package com.ruoyi.manage.domain;
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;
/**
* record_out
*
* @author wangh
* @date 2024-01-18
*/
public class RecordOutSort extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 机位码 */
@Excel(name = "机位码")
private String locationCode;
/** 数量 */
@Excel(name = "数量")
public int recordCount;
public void setLocationCode(String locationCode)
{
this.locationCode = locationCode;
}
public String getLocationCode()
{
return locationCode;
}
public int getRecordCount() {
return recordCount;
}
public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("locationCode", getLocationCode())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

@ -1,7 +1,10 @@
package com.ruoyi.manage.mapper;
import java.util.Date;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* Mapper
@ -59,4 +62,27 @@ public interface RecordInMapper
* @return
*/
public int deleteRecordInByObjids(String[] objids);
/**
*
*
* @param recordInSort
* @return
*/
List<RecordInSort> selectRecordInSortList(RecordInSort recordInSort);
/**
*
*
* @param batchCode
* @return
*/
public List<RecordIn> selectByBatchCode(String batchCode);
List<RecordInSort> selectRecordInList1(RecordInSort recordInSort);
List<RecordInSort> searchRecordsByDateAndBatchCode(
@Param("batchCode") String batchCode,
@Param("startDate") Date startDate,
@Param("endDate") Date endDate);
}

@ -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<RecordInspectionImg> selectRecordInspectionlocationList(RecordInspectionImg recordInspectionImg);
}

@ -59,4 +59,6 @@ public interface RecordInspectionMapper
* @return
*/
public int deleteRecordInspectionByInspectionIds(String[] inspectionIds);
int countInsertRecordNumber();
}

@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository;
* Mapper
*
* @author wangh
* @date 2024-01-26
* @date 2024-11-08
*/
@Repository
public interface RecordInvalidatedMapper

@ -1,7 +1,11 @@
package com.ruoyi.manage.mapper;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
import com.ruoyi.manage.domain.RecordOut;
import com.ruoyi.manage.domain.RecordOutSort;
import org.springframework.stereotype.Repository;
/**
* Mapper
@ -59,4 +63,18 @@ public interface RecordOutMapper
* @return
*/
public int deleteRecordOutByObjids(String[] objids);
/**
*
*
* @param recordOutSort
* @return
*/
List<RecordOutSort> selectRecordOutSortList(RecordOutSort recordOutSort);
/**
*
*
* @param locationCode
* @return
*/
public List<RecordOut> selectByLocationCode(String locationCode);
}

@ -1,7 +1,9 @@
package com.ruoyi.manage.service;
import java.util.Date;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
/**
* Service
@ -26,7 +28,13 @@ public interface IRecordInService
* @return
*/
public List<RecordIn> selectRecordInList(RecordIn recordIn);
/**
*
*
* @param recordInSort
* @return
*/
public List<RecordInSort> selectRecordInList(RecordInSort recordInSort);
/**
*
*
@ -58,4 +66,21 @@ public interface IRecordInService
* @return
*/
public int deleteRecordInByObjid(Long objid);
/**
*
*
* @param recordInSort
* @return
*/
List<RecordInSort> selectRecordInSortList(RecordInSort recordInSort);
/**
*
*
* @param
* @return
*/
public List<RecordIn> selectByBatchCode(String bathCode);
List<RecordInSort> searchRecordsByDateAndBatchCode(String batchCode, Date startDate, Date endDate);
}

@ -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<RecordInspectionImg> selectRecordInspectionlocationList(RecordInspectionImg recordInspectionImg);
}

@ -58,4 +58,6 @@ public interface IRecordInspectionService
* @return
*/
public int deleteRecordInspectionByInspectionId(Long inspectionId);
}

@ -7,7 +7,7 @@ import com.ruoyi.manage.domain.RecordInvalidated;
* Service
*
* @author wangh
* @date 2024-01-26
* @date 2024-11-08
*/
public interface IRecordInvalidatedService
{

@ -1,7 +1,11 @@
package com.ruoyi.manage.service;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
import com.ruoyi.manage.domain.RecordOut;
import com.ruoyi.manage.domain.RecordOutSort;
/**
* Service
@ -58,4 +62,18 @@ public interface IRecordOutService
* @return
*/
public int deleteRecordOutByObjid(Long objid);
/**
*
*
* @param recordOutSort
* @return
*/
List<RecordOutSort> selectRecordOutSortList(RecordOutSort recordOutSort);
/**
*
*
* @param
* @return
*/
public List<RecordOut> selectByLocationCode(String locationCode);
}

@ -1,10 +1,12 @@
package com.ruoyi.manage.service.impl;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.manage.domain.RecordInSort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.RecordInMapper;
@ -45,6 +47,17 @@ public class RecordInServiceImpl implements IRecordInService {
return recordInMapper.selectRecordInList(recordIn);
}
/**
* list1
*
* @param recordInSort
* @return
*/
@Override
public List<RecordInSort> selectRecordInList(RecordInSort recordInSort) {
return recordInMapper.selectRecordInList1(recordInSort);
}
/**
*
*
@ -90,4 +103,28 @@ public class RecordInServiceImpl implements IRecordInService {
public int deleteRecordInByObjid(Long objid) {
return recordInMapper.deleteRecordInByObjid(objid);
}
/**
*
*
* @param recordInSort
* @return
*/
@Override
public List<RecordInSort> selectRecordInSortList(RecordInSort recordInSort) {
return recordInMapper.selectRecordInSortList(recordInSort);
}
/**
*
*
* @param
* @return
*/
@Override
public List<RecordIn> selectByBatchCode(String batchCode) {
return recordInMapper.selectByBatchCode(batchCode);
}
@Override
public List<RecordInSort> searchRecordsByDateAndBatchCode(String batchCode, Date startDate, Date endDate) {
return recordInMapper.searchRecordsByDateAndBatchCode(batchCode, startDate, endDate);
}
}

@ -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<RecordInspectionImg> selectRecordInspectionlocationList(RecordInspectionImg recordInspectionImg) {
return recordInspectionImgMapper.selectRecordInspectionlocationList( recordInspectionImg);
}
}

@ -92,4 +92,6 @@ public class RecordInspectionServiceImpl implements IRecordInspectionService {
infoMapper.deleteRecordInspectionInfoByInspectionId(inspectionId);
return recordInspectionMapper.deleteRecordInspectionByInspectionId(inspectionId);
}
}

@ -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);
}

@ -5,6 +5,9 @@ import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
import com.ruoyi.manage.domain.RecordOutSort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.RecordOutMapper;
@ -90,4 +93,24 @@ public class RecordOutServiceImpl implements IRecordOutService {
public int deleteRecordOutByObjid(Long objid) {
return recordOutMapper.deleteRecordOutByObjid(objid);
}
/**
*
*
* @param recordOutSort
* @return
*/
@Override
public List<RecordOutSort> selectRecordOutSortList(RecordOutSort recordOutSort) {
return recordOutMapper.selectRecordOutSortList(recordOutSort);
}
/**
*
*
* @param
* @return
*/
@Override
public List<RecordOut> selectByLocationCode(String locationCode) {
return recordOutMapper.selectByLocationCode(locationCode);
}
}

@ -14,7 +14,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<resultMap type="RecordInSort" id="RecordInSortResult">
<!-- <result property="objid" column="objid" />-->
<result property="batchCode" column="batch_code" />
<result property="createTime" column="create_time" />
<result property="recordCount" column="record_count" />
<!-- <result property="remark" column="remark" />-->
<!-- <result property="createBy" column="create_by" />-->
</resultMap>
<sql id="selectRecordInVo">
select objid, epc_code, batch_code, location_code, manufacturer_Name, remark, create_by, create_time from record_in
</sql>
@ -33,7 +40,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectRecordInVo"/>
where objid = #{objid}
</select>
<select id="selectRecordInSortList" resultMap="RecordInSortResult">
SELECT batch_code, create_time, COUNT(*) AS record_count
FROM record_in
<where>
<if test="params.beginCheckTime != null and params.beginCheckTime != '' and params.endCheckTime != null and params.endCheckTime != ''"> and create_time between #{params.beginCheckTime} and #{params.endCheckTime}</if><if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
</where>
GROUP BY batch_code
ORDER BY batch_code
</select>
<!-- <select id="searchRecordsByDateAndBatchCode" resultMap="RecordInSortResult">-->
<!-- SELECT batch_code, DATE(create_time) AS create_date, COUNT(*) AS record_count-->
<!-- FROM record_in-->
<!-- WHERE-->
<!-- (batch_code = #{batchCode} OR #{batchCode} IS NULL OR #{batchCode} = '')-->
<!-- AND (DATE(create_time) >= #{startDate} OR #{startDate} IS NULL)-->
<!-- AND (DATE(create_time) <= #{endDate} OR #{endDate} IS NULL)-->
<!-- GROUP BY DATE(create_time), batch_code-->
<!-- ORDER BY batch_code, DATE(create_time);-->
<!-- </select>-->
<select id="searchRecordsByDateAndBatchCode" resultMap="RecordInSortResult">
SELECT batch_code, DATE(create_time) AS create_date, COUNT(*) AS record_count
FROM record_in
WHERE
(batch_code = #{batchCode} OR #{batchCode} IS NULL OR #{batchCode} = '')
AND (
(#{startDate} IS NOT NULL AND DATE(create_time) >= #{startDate})
OR (#{startDate} IS NULL AND #{endDate} IS NOT NULL AND DATE(create_time) &lt;= #{endDate})
OR (#{startDate} IS NULL AND #{endDate} IS NULL)
)
AND (
(#{endDate} IS NOT NULL AND DATE(create_time) &gt;= #{endDate})
OR (#{endDate} IS NULL AND #{startDate} IS NOT NULL AND DATE(create_time) >= #{startDate})
OR (#{startDate} IS NULL AND #{endDate} IS NULL)
)
GROUP BY DATE(create_time), batch_code
ORDER BY batch_code, DATE(create_time);
</select>
<select id="selectByBatchCode" parameterType="String" resultMap="RecordInResult">
SELECT * FROM record_in WHERE batch_code = #{batchCode}
</select>
<select id="selectRecordInList1" resultType="com.ruoyi.manage.domain.RecordInSort"></select>
<insert id="insertRecordIn" parameterType="RecordIn" useGeneratedKeys="true" keyProperty="objid">
insert into record_in
<trim prefix="(" suffix=")" suffixOverrides=",">

@ -5,15 +5,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.manage.mapper.RecordInspectionImgMapper">
<resultMap type="RecordInspectionImg" id="RecordInspectionImgResult">
<result property="objid" column="objid" />
<result property="inspectionId" column="inspection_id" />
<result property="taskId" column="task_id" />
<result property="locationCode" column="location_code" />
<result property="imgPath" column="img_path" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectRecordInspectionImgVo">
select inspection_id, task_id, img_path, create_by, create_time from record_inspection_img
select objid,inspection_id, task_id, location_code, img_path, create_by, create_time from record_inspection_img
</sql>
<select id="selectRecordInspectionImgList" parameterType="RecordInspectionImg" resultMap="RecordInspectionImgResult">
@ -21,7 +23,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="inspectionId != null "> and inspection_id = #{inspectionId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
<if test="imgPath != null and imgPath != ''"> and img_path = #{imgPath}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
@ -35,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inspectionId != null">inspection_id,</if>
<if test="taskId != null">task_id,</if>
<if test="locationCode != null">location_code,</if>
<if test="imgPath != null">img_path,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
@ -42,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inspectionId != null">#{inspectionId},</if>
<if test="taskId != null">#{taskId},</if>
<if test="locationCode != null">#{locationCode},</if>
<if test="imgPath != null">#{imgPath},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -52,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update record_inspection_img
<trim prefix="SET" suffixOverrides=",">
<if test="taskId != null">task_id = #{taskId},</if>
<if test="locationCode != null">location_code = #{locationCode},</if>
<if test="imgPath != null">img_path = #{imgPath},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@ -60,14 +68,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteRecordInspectionImgByInspectionId" parameterType="Long">
delete from record_inspection_img where inspection_id = #{inspectionId}
delete from record_inspection_img where objid = #{objid}
</delete>
<delete id="deleteRecordInspectionImgByInspectionIds" parameterType="String">
delete from record_inspection_img where inspection_id in
delete from record_inspection_img where objid in
<foreach item="inspectionId" collection="array" open="(" separator="," close=")">
#{inspectionId}
</foreach>
</delete>
<select id="selectRecordInspectionlocationList" parameterType="RecordInspectionImg" resultMap="RecordInspectionImgResult">
select location_code
from record_inspection_img
<where>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
</where>
group by location_code order by location_code
</select>
</mapper>

@ -8,6 +8,7 @@
<result property="inspectionId" column="inspection_id"/>
<result property="inspectionTime" column="inspection_time"/>
<result property="inspectionUser" column="inspection_user"/>
<result property="inspectionCode" column="inspection_code"/>
<result property="totalNumber" column="total_number"/>
<result property="normalNumber" column="normal_number"/>
<result property="abnormalNumber" column="abnormal_number"/>
@ -48,11 +49,11 @@
insert into record_inspection
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inspectionTime != null">inspection_time,</if>
<if test="inspectionUser != null">inspection_user,</if>
<if test="inspectionCode != null">inspection_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inspectionTime != null">#{inspectionTime},</if>
<if test="inspectionUser != null">#{inspectionUser},</if>
<if test="inspectionCode != null">#{inspectionCode},</if>
</trim>
</insert>
@ -78,4 +79,8 @@
</foreach>
</delete>
<select id="countInsertRecordNumber" resultType="integer">
select count(inspection_id) from record_inspection where date(inspection_time)= date(now())
</select>
</mapper>

@ -7,21 +7,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="RecordInvalidated" id="RecordInvalidatedResult">
<result property="objid" column="objid" />
<result property="epc" column="epc" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="typeName" column="type_name" />
<result property="reason" column="reason" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectRecordInvalidatedVo">
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
</sql>
<select id="selectRecordInvalidatedList" parameterType="RecordInvalidated" resultMap="RecordInvalidatedResult">
<include refid="selectRecordInvalidatedVo"/>
<where>
<if test="epc != null and epc != ''"> and epc = #{epc}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="typeName != null "> and type_name = #{typeName}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
@ -35,15 +36,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into record_invalidated
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="epc != null">epc,</if>
<if test="typeName != null">type_name,</if>
<if test="reason != null">reason,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="epc != null">#{epc},</if>
<if test="typeName != null">#{typeName},</if>
<if test="reason != null">#{reason},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark },</if>
</trim>
</insert>
@ -51,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update record_invalidated
<trim prefix="SET" suffixOverrides=",">
<if test="epc != null">epc = #{epc},</if>
<if test="typeName != null">type_name = #{typeName},</if>
<if test="reason != null">reason = #{reason},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>

@ -12,7 +12,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<resultMap type="RecordOutSort" id="RecordOutSortResult">
<!-- <result property="objid" column="objid" />-->
<result property="locationCode" column="location_code" />
<!-- <result property="createTime" column="create_time" />-->
<result property="recordCount" column="record_count" />
<!-- <result property="remark" column="remark" />-->
<!-- <result property="createBy" column="create_by" />-->
</resultMap>
<sql id="selectRecordOutVo">
select objid, epc_code, location_code, use_user, create_by, create_time from record_out
</sql>
@ -30,7 +37,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectRecordOutVo"/>
where objid = #{objid}
</select>
<select id="selectRecordOutSortList" resultMap="RecordOutSortResult">
SELECT location_code, COUNT(*) AS record_count
FROM record_out
<where>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
</where>
GROUP BY location_code
ORDER BY location_code
</select>
<select id="selectByLocationCode" parameterType="String" resultMap="RecordOutResult">
SELECT * FROM record_out WHERE location_code = #{locationCode}
</select>
<insert id="insertRecordOut" parameterType="RecordOut" useGeneratedKeys="true" keyProperty="objid">
insert into record_out
<trim prefix="(" suffix=")" suffixOverrides=",">

@ -0,0 +1,270 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="">
<meta name="description" content="">
<title>轮挡入库分类记录</title>
<link href="/css/bootstrap.min.css?v=3.3.7" rel="stylesheet"/>
<link href="/css/font-awesome.min.css?v=4.7.0" rel="stylesheet"/>
<!-- bootstrap-table 表格插件样式 -->
<link href="/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.22.6" rel="stylesheet"/>
<link href="/css/animate.min.css?v=20210831" rel="stylesheet"/>
<link href="/css/style.min.css?v=20210831" rel="stylesheet"/>
<link href="/ruoyi/css/ry-ui.css?v=4.7.9" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li class="select-time">
<label>入库时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginCheckTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endCheckTime]"/>
</li>
<li>
<label>批次码:</label>
<input type="text" name="batchCode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<!-- <a class="btn btn-primary btn-rounded btn-sm" id="btnSearch"><i class="fa fa-search"></i>&nbsp;搜索</a>-->
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<!-- 点击事件的方式打开使用 detailViewIcon: false and detailViewByClick: true
data-detail-view-icon="false"
data-detail-view-by-click="true" -->
<table id="bootstrap-table"></table>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <i class="fa fa-info-circle" style="color: red;"></i> 勾选数据导出指定列,否则为全部-->
<!-- <a class="btn btn-warning" onclick="exportSelected()">-->
<a class="btn btn-warning" onclick="$.table.exportExcel()">
<i class="fa fa-download"></i> 导出
</a>
</div>
</div>
</div>
<div>
<script> var ctx = "\/"; var lockscreen = null; if(lockscreen){window.top.location=ctx+"lockscreen";} </script>
<a id="scroll-up" href="javascript:;" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
<script src="/js/jquery.min.js?v=3.6.3"></script>
<script src="/js/bootstrap.min.js?v=3.3.7"></script>
<!-- bootstrap-table 表格插件 -->
<script src="/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=1.22.6"></script>
<script src="/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=1.22.6"></script>
<script src="/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=1.22.6"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="/ajax/libs/validate/jquery.validate.min.js?v=1.19.3"></script>
<script src="/ajax/libs/validate/jquery.validate.extend.js?v=1.19.3"></script>
<script src="/ajax/libs/validate/messages_zh.js?v=1.19.3"></script>
<!-- bootstrap-table 表格树插件 -->
<script src="/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js?v=1.22.6"></script>
<!-- 遮罩层 -->
<script src="/ajax/libs/blockUI/jquery.blockUI.js?v=2.70.0"></script>
<script src="/ajax/libs/iCheck/icheck.min.js?v=1.0.3"></script>
<script src="/ajax/libs/layer/layer.min.js?v=3.7.0"></script>
<script src="/ajax/libs/layui/layui.min.js?v=2.8.18"></script>
<script src="/ruoyi/js/common.js?v=4.7.9"></script>
<script src="/ruoyi/js/ry-ui.js?v=4.7.9"></script>
</div>
<script>
var prefix = ctx + "manage/record_in";
// var datas = [{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u6B63\u5E38\u72B6\u6001","dictCode":6,"dictSort":1,"dictLabel":"\u6B63\u5E38","dictValue":"0","dictType":"sys_normal_disable","cssClass":"","listClass":"primary","isDefault":"Y","status":"0","default":true},{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u505C\u7528\u72B6\u6001","dictCode":7,"dictSort":2,"dictLabel":"\u505C\u7528","dictValue":"1","dictType":"sys_normal_disable","cssClass":"","listClass":"danger","isDefault":"N","status":"0","default":false}];
$(function() {
var options = {
url: prefix + "/sort_list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
detailView: true,
modalName: "轮挡批次入库统计",
exportUrl: prefix + "/export_sort",
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [
{
checkbox: true
},
{
field: 'createTime',
title: '入库时间',width :250
/* formatter: function(value, row, index) {
// 假设value是一个标准的日期时间字符串
if (value) {
// 解析日期时间字符串并格式化为仅显示日期部分
var date = new Date(value);
// 使用JavaScript的Date对象方法来格式化日期
// 注意这里使用了简单的拼接来格式化日期您也可以使用更复杂的库如moment.js来格式化日期
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, '0') + '-' + date.getDate().toString().padStart(2, '0');
}
return value; // 如果value为空或不是有效的日期时间字符串则直接返回原始值
}*/
},
{
field : 'batchCode',
title : '批次码',width :250
},
{
field: 'recordCount',
title: '数量',
formatter: function(value, row, index) {
console.log('Record Count Value:', value); // 在控制台打印数量值
return value;
}
},
// {
// // field: 'status',
// // title: '用户状态',
// // align: 'center',
// formatter: function(value, row, index) {
// return $.table.selectDictLabel(datas, value);
// }
// },
]
};
$.table.init(options);
});
initChildTable = function(index, row, $detail) {
var batchCode = row.batchCode;
var childTable = $detail.html('<table></table>').find('table');
$(childTable).bootstrapTable({
url: prefix + "/sort_BatchCode",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
// pagination: true, // 开启分页功能
// pageSize: 10, // 设置每页显示的记录数
// pageList: [10, 25, 50, 100], // 设置可供选择的每页显示的记录数
// queryParams : {
// userName: '轮挡入库分类记录'
// },
queryParams: function(params) {
// 在queryParams中添加批次码参数
return {
batchCode: batchCode, // 将批次码添加到查询参数中
// limit: params.limit,
// offset: params.offset,
// sort: params.sort,
// order: params.order,
// 可以根据需要添加其他查询参数
};
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index+1
}
},
{
field: 'objid',
title: '主键',
visible: false
},
{
field: 'epcCode',
title: 'RFID编码'
},
// {
// field: 'batchCode',
// title: '批次码'
// },
{
field: 'recordCount',
title: '数量',
visible: false
},
{
field: 'locationCode',
title: '库位码'
},
{
field: 'manufacturerName',
title: '厂家'
},
{
field: 'createBy',
title: '入库人'
},
// {
// field: 'createTime',
// title: '入库时间'
// },
/* {
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}*/]
});
};
function exportSelected() {
var $table =$('#bootstrap-table');
/* var selections = $table.bootstrapTable('getSelections');
var objIds = $.map(selections, function (row) {
return row.batchCode; // 假设objid是父表每行的唯一标识
});
// var objIds = row.batchCode;
if (objIds.length === 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
var dataParam = {
objIds: objIds.join(',')
};
*/
/* $.modal.confirm("确定导出数据吗?", function() {
$.ajax({
url: prefix + "/export_sort", // 修改为您的导出接口URL
method: 'POST',
data: dataParam,
success: function(result) {
if (result.code === web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("导出失败");
}
});
});*/
}
</script>
</body>
</html>

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增巡检历史图片')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -18,15 +19,25 @@
<input name="taskId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">机位码:</label>
<div class="col-sm-8">
<input name="locationCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">路径:</label>
<div class="col-sm-8">
<input name="imgPath" class="form-control" type="text">
<input type="hidden" name="imgPath">
<div class="file-loading">
<input class="form-control file-upload" id="imgPath" name="file" type="file">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
var prefix = ctx + "manage/record_inspection_img"
$("#form-record_inspection_img-add").validate({
@ -38,6 +49,16 @@
$.operate.save(prefix + "/add", $('#form-record_inspection_img-add').serialize());
}
}
$(".file-upload").fileinput({
uploadUrl: ctx + 'common/upload',
maxFileCount: 1,
autoReplace: true
}).on('fileuploaded', function (event, data, previewId, index) {
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
}).on('fileremoved', function (event, id, index) {
$("input[name='" + event.currentTarget.id + "']").val('')
})
</script>
</body>
</html>

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改巡检历史图片')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -19,15 +20,25 @@
<input name="taskId" th:field="*{taskId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">机位码:</label>
<div class="col-sm-8">
<input name="locationCode" th:field="*{locationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">路径:</label>
<div class="col-sm-8">
<input name="imgPath" th:field="*{imgPath}" class="form-control" type="text">
<input type="hidden" name="imgPath" th:field="*{imgPath}">
<div class="file-loading">
<input class="form-control file-upload" id="imgPath" name="file" type="file">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
var prefix = ctx + "manage/record_inspection_img";
$("#form-record_inspection_img-edit").validate({
@ -39,6 +50,22 @@
$.operate.save(prefix + "/edit", $('#form-record_inspection_img-edit').serialize());
}
}
$(".file-upload").each(function (i) {
var val = $("input[name='" + this.id + "']").val()
$(this).fileinput({
'uploadUrl': ctx + 'common/upload',
initialPreviewAsData: true,
initialPreview: [val],
maxFileCount: 1,
autoReplace: true
}).on('fileuploaded', function (event, data, previewId, index) {
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
}).on('fileremoved', function (event, id, index) {
$("input[name='" + event.currentTarget.id + "']").val('')
})
$(this).fileinput('_initFileActions');
});
</script>
</body>
</html>

@ -1,83 +1,115 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('巡检历史图片列表')" />
<th:block th:include="include :: header('巡检历史图片列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>巡检id</label>
<input type="text" name="inspectionId"/>
</li>
<li>
<label>任务表id</label>
<input type="text" name="taskId"/>
</li>
<li>
<label>路径:</label>
<input type="text" name="imgPath"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<!-- <li>-->
<!-- <label>巡检id</label>-->
<!-- <input type="text" name="inspectionId"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>任务表id</label>-->
<!-- <input type="text" name="taskId"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>机位码:</label>-->
<input type="hidden" name="locationCode" th:value="${location}"/>
<!-- </li>-->
<li>
<label>上传人:</label>
<input type="text" name="createBy"/>
</li>
<li class="select-time">
<label>上传时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:record_inspection_img:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="manage:record_inspection_img:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()"-->
<!-- shiro:hasPermission="manage:record_inspection_img:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:record_inspection_img:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manage:record_inspection_img:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manage:record_inspection_img:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manage:record_inspection_img:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
<a class="btn btn-warning multiple disabled" onclick="downloadItem()"
shiro:hasPermission="manage:record_inspection_img:edit">
<i class="fa fa-edit"></i> 下载
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:record_inspection_img:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:record_inspection_img:remove')}]];
var prefix = ctx + "manage/record_inspection_img";
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:record_inspection_img:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:record_inspection_img:remove')}]];
var prefix = ctx + "manage/record_inspection_img";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "巡检历史图片",
columns: [{
checkbox: true
},
{
field: 'inspectionId',
title: '巡检id'
},
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "巡检历史图片",
// queryParams: queryParams,
columns: [{
checkbox: true
},
// {
// field: 'inspectionId',
// title: '巡检id'
// },
{
field: 'taskId',
title: '任务表id'
field: 'objid',
title: '主键',
visible: false
},
// {
// field: 'locationCode',
// title: '机位码',
// visible: false
// },
{
field: 'imgPath',
title: '路径'
title: '巡检图片',
formatter: function (value, row, index) {
return $.table.imageView(value, 818, 460, null);
}
},
{
field: 'createBy',
@ -87,19 +119,45 @@
field: 'createTime',
title: '上传时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inspectionId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.inspectionId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inspectionId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function queryParams() {
console.log("查询")
var search = $.table.queryParams(params);
console.log(search)
return search;
}
function downloadItem() {
table.set();
var rows = $.table.selectColumns("imgPath");
var length = rows.length;
if (length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
console.log(rows)
$.modal.confirm("确认要下载选中的" + rows.length + "条数据吗?", function() {
// var url = table.options.exportUrl;
// var data = { "ids": rows.join() };
// $.operate.submit(url, "post", "json", data);
rows.forEach(item => window.open(ctx + "common/download/resource?resource=" + item,'_blank') )
});
</script>
}
</script>
</body>
</html>

@ -0,0 +1,143 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('巡检历史图片列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>机位码:</label>
<input type="text" name="locationCode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:record_inspection_img:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manage:record_inspection_img:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manage:record_inspection_img:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manage:record_inspection_img:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<!-- <table id="bootstrap-table"></table>-->
<table id="bootstrap-table" data-page-size="10"
data-show-custom-view="true" data-custom-view="customViewFormatter"
data-show-custom-view-button="true"></table>
</div>
</div>
</div>
<template id="profileTemplate">
<div class="col-sm-2">
<div class="contact-box">
<a onclick="$.modal.openTab('图片详情','manage/record_inspection_img/img/%locationCode%')">
<div class="col-sm-12" >
<div class="text-center">
<img alt="image" class=" m-t-xs img-responsive col-sm-12" src="/img/folder.png"
style="padding: 20%"/>
<div class="m-t-xs font-bold">%locationCode%</div>
</div>
</div>
<!-- <div class="col-sm-8">
<h3><strong>%userCode%</strong></h3>
<p><i class="fa fa-jpy"></i> %userBalance%</p>
<address>
<strong>RuoYi, Inc.</strong><br>
E-mail: %userEmail%<br>
<abbr title="Phone">Tel:</abbr> %userPhone%
</address>
</div>-->
<div class="clearfix"></div>
</a>
</div>
</div>
</template>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-custom-view-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:record_inspection_img:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:record_inspection_img:remove')}]];
var prefix = ctx + "manage/record_inspection_img";
$(function() {
var options = {
url: prefix + "/locationList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "巡检历史图片",
columns: [{
checkbox: true
},
// {
// field: 'inspectionId',
// title: '巡检id'
// },
// {
// field: 'taskId',
// title: '任务表id'
// },
{
field: 'locationCode',
title: '机位码'
},
/* {
field: 'imgPath',
title: '路径'
},
{
field: 'createBy',
title: '上传人'
},
{
field: 'createTime',
title: '上传时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inspectionId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.inspectionId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}*/]
};
$.table.init(options);
});
function customViewFormatter(data) {
var template = $('#profileTemplate').html()
var view = ''
$.each(data, function (i, row) {
view += template.replace('%locationCode%', row.locationCode)
.replace("%locationCode%", row.locationCode);
})
return `<div class="row mx-0">${view}</div>`
}
</script>
</body>
</html>

@ -12,6 +12,26 @@
<input name="epc" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">异常类型:</label>
<div class="col-sm-8">
<select name="typeName" class="form-control m-b" th:with="type=${@dict.getType('bf_y_n')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">原因:</label>
<div class="col-sm-8">
<input name="reason" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其他说明:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

@ -13,6 +13,26 @@
<input name="epc" th:field="*{epc}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">异常类型:</label>
<div class="col-sm-8">
<select name="typeName" class="form-control m-b" th:with="type=${@dict.getType('bf_y_n')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{typeName}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">原因:</label>
<div class="col-sm-8">
<input name="reason" th:field="*{reason}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其他说明:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

@ -1,87 +1,84 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('轮挡报废记录列表')"/>
<th:block th:include="include :: header('轮挡报废记录列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>RFID</label>
<input type="text" name="epc"/>
</li>
<li>
<label>操作人:</label>
<input type="text" name="createBy"/>
</li>
<li class="select-time">
<label>报废时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>RFID</label>
<input type="text" name="epc"/>
</li>
<li>
<label>异常类型:</label>
<select name="typeName" th:with="type=${@dict.getType('bf_y_n')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>提交时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:record_invalidated:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="manage:record_invalidated:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="manage:record_invalidated:remove">
<i class="fa fa-remove"></i> 删除
</a>-->
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="manage:record_invalidated:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:record_invalidated:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manage:record_invalidated:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manage:record_invalidated:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manage:record_invalidated:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:record_invalidated:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:record_invalidated:remove')}]];
var prefix = ctx + "manage/record_invalidated";
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:record_invalidated:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:record_invalidated:remove')}]];
var typeNameDatas = [[${@dict.getType('bf_y_n')}]];
var prefix = ctx + "manage/record_invalidated";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "轮挡报废记录",
sortOrder: "desc",
sortName: "createTime",
detailView: true,
onExpandRow: function (index, row, $detail) {
initinspectionTable(index, row, $detail);
},
columns: [{
checkbox: true
},
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "轮挡报废记录",
sortOrder: "desc",
sortName: "createTime",
detailView: true,
onExpandRow: function (index, row, $detail) {
initinspectionTable(index, row, $detail);
},
columns: [{
checkbox: true
},
{
field: 'objid',
title: '主键',
@ -91,75 +88,79 @@
field: 'epc',
title: 'RFID'
},
{
field: 'typeName',
title: '异常类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(typeNameDatas, value);
}
},
{
field: 'reason',
title: '报废原因'
title: '原因'
},
{
field: 'remark',
title: '其他说明'
},
{
field: 'createBy',
title: '操作人'
},
{
field: 'createTime',
title: '报废时间'
title: '提交时间'
},
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
initinspectionTable = function (index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
};
$.table.init(options);
});
initinspectionTable = function (index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').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
}
$(childTable).bootstrapTable({
url: ctx + "manage/record_invalidated_img/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
invalidatedId: row.objid
},
{
field: 'epc',
title: 'RFID'
},
{
field: 'imgPath',
title: '图片',
formatter: function (value, row, index) {
return $.table.imageView(value, 818, 460, null);
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: '创建人'
},
]
});
};
</script>
}
},
{
field: 'createBy',
title: '创建人'
},
]
});
};
</script>
</body>
</html>

@ -14,6 +14,11 @@
<label>RFID</label>
<input type="text" name="epcCode"/>
</li>
<li>
<label>机位码:</label>
<input type="text" name="locationCode"/>
</li>
<li>
<label>领用人:</label>
<input type="text" name="useUser"/>

@ -0,0 +1,261 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="">
<meta name="description" content="">
<title>轮挡入库分类记录</title>
<link href="/css/bootstrap.min.css?v=3.3.7" rel="stylesheet"/>
<link href="/css/font-awesome.min.css?v=4.7.0" rel="stylesheet"/>
<!-- bootstrap-table 表格插件样式 -->
<link href="/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.22.6" rel="stylesheet"/>
<link href="/css/animate.min.css?v=20210831" rel="stylesheet"/>
<link href="/css/style.min.css?v=20210831" rel="stylesheet"/>
<link href="/ruoyi/css/ry-ui.css?v=4.7.9" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<!-- <li class="select-time">-->
<!-- <label>出库时间:</label>-->
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间"-->
<!-- name="params[beginCheckTime]"/>-->
<!-- <span>-</span>-->
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间"-->
<!-- name="params[endCheckTime]"/>-->
<!-- </li>-->
<li>
<label>机位码:</label>
<input type="text" name="locationCode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<!-- <a class="btn btn-primary btn-rounded btn-sm" id="btnSearch"><i class="fa fa-search"></i>&nbsp;搜索</a>-->
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<!-- 点击事件的方式打开使用 detailViewIcon: false and detailViewByClick: true
data-detail-view-icon="false"
data-detail-view-by-click="true" -->
<table id="bootstrap-table"></table>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <i class="fa fa-info-circle" style="color: red;"></i>
勾选数据导出指定列,否则为全部-->
<!-- <a class="btn btn-warning" onclick="exportSelected()">-->
<a class="btn btn-warning" onclick="$.table.exportExcel()">
<i class="fa fa-download"></i> 导出
</a>
</div>
</div>
</div>
<div>
<script> var ctx = "\/"; var lockscreen = null; if(lockscreen){window.top.location=ctx+"lockscreen";} </script>
<a id="scroll-up" href="javascript:;" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
<script src="/js/jquery.min.js?v=3.6.3"></script>
<script src="/js/bootstrap.min.js?v=3.3.7"></script>
<!-- bootstrap-table 表格插件 -->
<script src="/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=1.22.6"></script>
<script src="/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=1.22.6"></script>
<script src="/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=1.22.6"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="/ajax/libs/validate/jquery.validate.min.js?v=1.19.3"></script>
<script src="/ajax/libs/validate/jquery.validate.extend.js?v=1.19.3"></script>
<script src="/ajax/libs/validate/messages_zh.js?v=1.19.3"></script>
<!-- bootstrap-table 表格树插件 -->
<script src="/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js?v=1.22.6"></script>
<!-- 遮罩层 -->
<script src="/ajax/libs/blockUI/jquery.blockUI.js?v=2.70.0"></script>
<script src="/ajax/libs/iCheck/icheck.min.js?v=1.0.3"></script>
<script src="/ajax/libs/layer/layer.min.js?v=3.7.0"></script>
<script src="/ajax/libs/layui/layui.min.js?v=2.8.18"></script>
<script src="/ruoyi/js/common.js?v=4.7.9"></script>
<script src="/ruoyi/js/ry-ui.js?v=4.7.9"></script>
</div>
<script>
var prefix = ctx + "manage/record_out";
// var datas = [{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u6B63\u5E38\u72B6\u6001","dictCode":6,"dictSort":1,"dictLabel":"\u6B63\u5E38","dictValue":"0","dictType":"sys_normal_disable","cssClass":"","listClass":"primary","isDefault":"Y","status":"0","default":true},{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u505C\u7528\u72B6\u6001","dictCode":7,"dictSort":2,"dictLabel":"\u505C\u7528","dictValue":"1","dictType":"sys_normal_disable","cssClass":"","listClass":"danger","isDefault":"N","status":"0","default":false}];
$(function() {
var options = {
url: prefix + "/sort_list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
detailView: true,
modalName:"机位领用统计",
exportUrl: prefix + "/exportData",
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [
// {
// field: 'createTime',
// title: '入库时间',
// formatter: function(value, row, index) {
// // 假设value是一个标准的日期时间字符串
// if (value) {
// // 解析日期时间字符串并格式化为仅显示日期部分
// var date = new Date(value);
// // 使用JavaScript的Date对象方法来格式化日期
// // 注意这里使用了简单的拼接来格式化日期您也可以使用更复杂的库如moment.js来格式化日期
// return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, '0') + '-' + date.getDate().toString().padStart(2, '0');
// }
// return value; // 如果value为空或不是有效的日期时间字符串则直接返回原始值
// }
// },
{
field : 'locationCode',
title : '机位码'
},
{
field: 'recordCount',
title: '数量',
formatter: function(value, row, index) {
console.log('Record Count Value:', value); // 在控制台打印数量值
return value;
}
},
// {
// // field: 'status',
// // title: '用户状态',
// // align: 'center',
// formatter: function(value, row, index) {
// return $.table.selectDictLabel(datas, value);
// }
// },
{
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs" href="javascript:;"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:;"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
}]
};
$.table.init(options);
});
initChildTable = function(index, row, $detail) {
var locationCode = row.locationCode;
var childTable = $detail.html('<table </table>').find('table');
$(childTable).bootstrapTable({
url: prefix + "/sort_LocationCode",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
// pagination: true, // 开启分页功能
// pageSize: 10, // 设置每页显示的记录数
// pageList: [10, 25, 50, 100], // 设置可供选择的每页显示的记录数
// queryParams : {
// userName: '轮挡出库分类记录'
// },
queryParams: function(params) {
// 在queryParams中添加批次码参数
return {
locationCode: locationCode, //
// limit: params.limit,
// offset: params.offset,
// sort: params.sort,
// order: params.order,
// 可以根据需要添加其他查询参数
};
},
columns: [
{
checkbox: true
},
{
title: '序号',
formatter: function (value, row, index) {
return index+1
}
},
{
field: 'objid',
title: '主键',
visible: false
},
{
field: 'epcCode',
title: 'RFID编码'
},
// {
// field: 'batchCode',
// title: '批次码'
// },
{
field: 'recordCount',
title: '数量',
visible: false
},
{
field: 'useUser',
title: '领用人'
},
{
field: 'createBy',
title: '出库人'
},
{
field: 'createTime',
title: '出库时间'
},
// {
// field: 'createTime',
// title: '入库时间'
// },
/* {
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}*/]
});
};
// 导出数据
function exportSelected() {
// var userIds = $.table.selectColumns("objid");
var dataParam = $("#export-form").serializeArray();
var tipMsg = "确定导出所有数据吗?";
// if($.common.isNotEmpty(userIds)){
// tipMsg = "确定导出勾选" + userIds.length + "条数据吗?";
// dataParam.push({ "name": "userIds", "value": userIds });
// }
$.modal.confirm(tipMsg, function() {
$.post(prefix + "/exportData", dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else {
$.modal.alertError(result.msg);
}
});
});
}
</script>
</body>
</html>

@ -124,7 +124,6 @@
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index+1

Loading…
Cancel
Save