Merge remote-tracking branch 'origin/master'

master
wg 5 months ago
commit d1e3bf184a

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

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

@ -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,6 +36,11 @@ public class RecordInspectionImgController extends BaseController
@RequiresPermissions("manage:record_inspection_img:view")
@GetMapping()
public String record_inspection_lo()
{
return prefix + "/record_inspection_location";
}
@GetMapping("/img")
public String record_inspection_img()
{
return prefix + "/record_inspection_img";
@ -44,7 +49,7 @@ public class RecordInspectionImgController extends BaseController
/**
*
*/
//@RequiresPermissions("manage:record_inspection_img:list")
@RequiresPermissions("manage:record_inspection_img:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(RecordInspectionImg recordInspectionImg)
@ -53,6 +58,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")

@ -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
{
@ -23,6 +23,10 @@ public class RecordInspectionImg extends BaseEntity
@Excel(name = "任务表id")
private Long taskId;
/** 机位码 */
@Excel(name = "机位码")
private String locationCode;
/** 路径 */
@Excel(name = "路径")
private String imgPath;
@ -45,6 +49,15 @@ public class RecordInspectionImg extends BaseEntity
{
return taskId;
}
public void setLocationCode(String locationCode)
{
this.locationCode = locationCode;
}
public String getLocationCode()
{
return locationCode;
}
public void setImgPath(String imgPath)
{
this.imgPath = imgPath;
@ -60,6 +73,7 @@ public class RecordInspectionImg extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("inspectionId", getInspectionId())
.append("taskId", getTaskId())
.append("locationCode", getLocationCode())
.append("imgPath", getImgPath())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())

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

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

@ -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
{

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

@ -7,13 +7,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="RecordInspectionImg" id="RecordInspectionImgResult">
<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 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 +22,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 +39,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 +47,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 +58,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>
@ -70,4 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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>

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

@ -19,8 +19,18 @@
<input type="text" name="taskId"/>
</li>
<li>
<label>路径:</label>
<input type="text" name="imgPath"/>
<label>机位码:</label>
<input type="text" name="locationCode"/>
</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>
@ -75,6 +85,10 @@
field: 'taskId',
title: '任务表id'
},
{
field: 'locationCode',
title: '机位码'
},
{
field: 'imgPath',
title: '路径'

@ -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('图片详情','device/fileinfo/%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>
Loading…
Cancel
Save