Compare commits

...

10 Commits

@ -6,16 +6,17 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://119.45.202.115:3306/bg_wheel_chocks?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://119.45.202.115:3306/bg_wheel_chocks?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://1.13.177.47:3306/bg_wheel_chocks?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: haiwei@123
password: Haiwei123456
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
enabled: true
url: jdbc:mysql://119.45.202.115:3306/no_power_control?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: haiwei@123
# 初始连接数
initialSize: 5
# 最小连接池数量

@ -64,9 +64,9 @@ spring:
servlet:
multipart:
# 单个文件大小
max-file-size: 20MB
max-file-size: 50MB
# 设置总上传的文件大小
max-request-size: 30MB
max-request-size: 50MB
# 服务模块
devtools:
restart:

@ -4,7 +4,7 @@ html {
body.signin {
height: auto;
background: url(../img/main_bg.png) no-repeat center fixed;
background: url(../img/man_bg2.png) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 KiB

@ -0,0 +1,311 @@
/* @license
* jQuery.print, version 1.6.2
* Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
*--------------------------------------------------------------------------*/
(function ($) {
"use strict";
// A nice closure for our definitions
function jQueryCloneWithSelectAndTextAreaValues(elmToClone, withDataAndEvents, deepWithDataAndEvents) {
// Replacement jQuery clone that also clones the values in selects and textareas as jQuery doesn't for performance reasons - https://stackoverflow.com/questions/742810/clone-isnt-cloning-select-values
// Based on https://github.com/spencertipping/jquery.fix.clone
var $elmToClone = $(elmToClone),
$result = $elmToClone.clone(withDataAndEvents, deepWithDataAndEvents),
$myTextareas = $elmToClone.find('textarea').add($elmToClone.filter('textarea')),
$resultTextareas = $result.find('textarea').add($result.filter('textarea')),
$mySelects = $elmToClone.find('select').add($elmToClone.filter('select')),
$resultSelects = $result.find('select').add($result.filter('select')),
$myCanvas = $elmToClone.find('canvas').add($elmToClone.filter('canvas')),
$resultCanvas = $result.find('canvas').add($result.filter('canvas')),
i, l, j, m, myCanvasContext;
for (i = 0, l = $myTextareas.length; i < l; ++i) {
$($resultTextareas[i]).val($($myTextareas[i]).val());
}
for (i = 0, l = $mySelects.length; i < l; ++i) {
for (j = 0, m = $mySelects[i].options.length; j < m; ++j) {
if ($mySelects[i].options[j].selected === true) {
$resultSelects[i].options[j].selected = true;
}
}
}
for (i = 0, l = $myCanvas.length; i < l; ++i) {
// https://stackoverflow.com/a/41242597
myCanvasContext = $myCanvas[i].getContext('2d');
if(myCanvasContext) {
$resultCanvas[i].getContext('2d').drawImage($myCanvas[i], 0,0);
$($resultCanvas[i]).attr("data-jquery-print", myCanvasContext.canvas.toDataURL());
}
}
return $result;
}
function getjQueryObject(string) {
// Make string a vaild jQuery thing
var jqObj = $("");
try {
jqObj = jQueryCloneWithSelectAndTextAreaValues(string);
} catch (e) {
jqObj = $("<span />")
.html(string);
}
return jqObj;
}
function printFrame(frameWindow, content, options) {
// Print the selected window/iframe
var def = $.Deferred();
try {
frameWindow = frameWindow.contentWindow || frameWindow.contentDocument || frameWindow;
try {
frameWindow.resizeTo(window.innerWidth, window.innerHeight);
} catch (err) {
console.warn(err);
}
var wdoc = frameWindow.document || frameWindow.contentDocument || frameWindow;
if(options.doctype) {
wdoc.write(options.doctype);
}
wdoc.write(content);
try {
var canvas = wdoc.querySelectorAll('canvas');
for(var i = 0; i < canvas.length; i++) {
var ctx = canvas[i].getContext("2d");
var image = new Image();
image.onload = function() {
ctx.drawImage(image, 0, 0);
};
image.src = canvas[i].getAttribute("data-jquery-print");
}
} catch (err) {
console.warn(err);
}
wdoc.close();
var printed = false,
callPrint = function () {
if(printed) {
return;
}
// Fix for IE : Allow it to render the iframe
frameWindow.focus();
try {
// Fix for IE11 - printng the whole page instead of the iframe content
if (!frameWindow.document.execCommand('print', false, null)) {
// document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
frameWindow.print();
}
// focus body as it is losing focus in iPad and content not getting printed
$('body').focus();
} catch (e) {
frameWindow.print();
}
frameWindow.close();
printed = true;
def.resolve();
};
// Print once the frame window loads - seems to work for the new-window option but unreliable for the iframe
$(frameWindow).on("load", callPrint);
// Fallback to printing directly if the frame doesn't fire the load event for whatever reason
setTimeout(callPrint, options.timeout);
} catch (err) {
def.reject(err);
}
return def;
}
function printContentInIFrame(content, options) {
var $iframe = $(options.iframe + "");
var iframeCount = $iframe.length;
if (iframeCount === 0) {
// Create a new iFrame if none is given
$iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>')
.prependTo('body')
.css({
"position": "absolute",
"top": -999,
"left": -999
});
}
var frameWindow = $iframe.get(0);
return printFrame(frameWindow, content, options)
.done(function () {
// Success
setTimeout(function () {
// Wait for IE
if (iframeCount === 0) {
// Destroy the iframe if created here
$iframe.remove();
}
}, 1000);
})
.fail(function (err) {
// Use the pop-up method if iframe fails for some reason
console.error("Failed to print from iframe", err);
printContentInNewWindow(content, options);
})
.always(function () {
try {
options.deferred.resolve();
} catch (err) {
console.warn('Error notifying deferred', err);
}
});
}
function printContentInNewWindow(content, options) {
// Open a new window and print selected content
var frameWindow = window.open();
return printFrame(frameWindow, content, options)
.always(function () {
try {
options.deferred.resolve();
} catch (err) {
console.warn('Error notifying deferred', err);
}
});
}
function isNode(o) {
/* http://stackoverflow.com/a/384380/937891 */
return !!(typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
}
$.print = $.fn.print = function () {
// Print a given set of elements
var options, $this, self = this;
// console.log("Printing", this, arguments);
if (self instanceof $) {
// Get the node if it is a jQuery object
self = self.get(0);
}
if (isNode(self)) {
// If `this` is a HTML element, i.e. for
// $(selector).print()
$this = $(self);
if (arguments.length > 0) {
options = arguments[0];
}
} else {
if (arguments.length > 0) {
// $.print(selector,options)
$this = $(arguments[0]);
if (isNode($this[0])) {
if (arguments.length > 1) {
options = arguments[1];
}
} else {
// $.print(options)
options = arguments[0];
$this = $("html");
}
} else {
// $.print()
$this = $("html");
}
}
// Default options
var defaults = {
globalStyles: true,
mediaPrint: false,
stylesheet: null,
noPrintSelector: ".no-print",
iframe: true,
append: null,
prepend: null,
manuallyCopyFormValues: true,
deferred: $.Deferred(),
timeout: 750,
title: null,
doctype: '<!doctype html>'
};
// Merge with user-options
options = $.extend({}, defaults, (options || {}));
var $styles = $("");
if (options.globalStyles) {
// Apply the stlyes from the current sheet to the printed page
$styles = $("style, link, meta, base, title");
} else if (options.mediaPrint) {
// Apply the media-print stylesheet
$styles = $("link[media=print]");
}
if (options.stylesheet) {
// Add a custom stylesheet(s) if given
if (!(($.isArray ? $.isArray : Array.isArray)(options.stylesheet))) {
options.stylesheet = [options.stylesheet]
}
for(var i = 0; i < options.stylesheet.length; i++) {
$styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet[i] + '">'));
}
}
// Create a copy of the element to print
var copy = jQueryCloneWithSelectAndTextAreaValues($this, true, true);
// Wrap it in a span to get the HTML markup string
copy = $("<span/>")
.append(copy);
// Remove unwanted elements
copy.find(options.noPrintSelector)
.remove();
// Add in the styles
copy.append(jQueryCloneWithSelectAndTextAreaValues($styles));
// Update title
if (options.title) {
var title = $("title", copy);
if (title.length === 0) {
title = $("<title />");
copy.append(title);
}
title.text(options.title);
}
// Appedned content
copy.append(getjQueryObject(options.append));
// Prepended content
copy.prepend(getjQueryObject(options.prepend));
if (options.manuallyCopyFormValues) {
// Manually copy form values into the HTML for printing user-modified input fields
// http://stackoverflow.com/a/26707753
copy.find("input")
.each(function () {
var $field = $(this);
if ($field.is("[type='radio']") || $field.is("[type='checkbox']")) {
if ($field.prop("checked")) {
$field.attr("checked", "checked");
}
} else {
$field.attr("value", $field.val());
}
});
copy.find("select").each(function () {
var $field = $(this);
$field.find(":selected").attr("selected", "selected");
});
copy.find("textarea").each(function () {
// Fix for https://github.com/DoersGuild/jQuery.print/issues/18#issuecomment-96451589
var $field = $(this);
$field.text($field.val());
});
}
// Get the HTML markup string
var content = copy.html();
// Notify with generated markup & cloned elements - useful for logging, etc
try {
options.deferred.notify('generated_markup', content, copy);
} catch (err) {
console.warn('Error notifying deferred', err);
}
// Destroy the copy
copy.remove();
if (options.iframe) {
// Use an iframe for printing
try {
printContentInIFrame(content, options);
} catch (e) {
// Use the pop-up method if iframe fails for some reason
console.error("Failed to print from iframe", e.stack, e.message);
printContentInNewWindow(content, options);
}
} else {
// Use a new window for printing
printContentInNewWindow(content, options);
}
return this;
};
})(jQuery);

@ -13,7 +13,7 @@
</head>
<body class="gray-bg">
<img alt="[ BGS ]" src="../static/img/main.jpg" th:src="@{/img/main_bg.png}" width="100%" height="100%" id="img_main">
<img alt="[ BGS ]" src="../static/img/main.jpg" th:src="@{/img/man_bg2.png}" width="100%" height="100%" id="img_main">
<!--<div class="ibox-content">-->
<!-- <div class="text-center">-->
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">打开示例窗口</button>-->

@ -207,6 +207,7 @@ public class ApiController {
List<StockDto> list = JSONObject.parseArray(json, StockDto.class);
if (list != null && !list.isEmpty()) {
locationCode=list.get(0).getLocationCode();
apiService.deleteInspectionInfo(locationCode, inspectionId);
apiService.insertInspectionInfo(list, inspectionId);
}

@ -1,6 +1,7 @@
package com.ruoyi.api.controller;
import com.ruoyi.api.domain.BroadCountNumber;
import com.ruoyi.api.domain.NoPowerDevice;
import com.ruoyi.api.service.impl.BroadApiService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.manage.domain.BaseStore;
@ -46,5 +47,13 @@ public class BroadApiController {
}
@PostMapping("/getDevice")
@ResponseBody
public AjaxResult getDevice(String storeName){
List<NoPowerDevice> list=service.getDevice(storeName);
return AjaxResult.success(list);
}
}

@ -0,0 +1,78 @@
package com.ruoyi.api.domain;
import com.ruoyi.common.annotation.Excel;
public class NoPowerDevice {
/** 摆放桩位 */
@Excel(name = "摆放桩位")
private String locationName;
/** 设备编码 */
@Excel(name = "设备编码")
private String deviceCode;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 设备类型 */
@Excel(name = "设备类型")
private Long deviceType;
/** 使用状态 */
@Excel(name = "使用状态 0=空闲 1=使用中")
private String useState;
/** 设备状态 */
@Excel(name = "设备状态 0=停用 1=正常 2=维修中")
private String deviceState;
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
public String getDeviceCode() {
return deviceCode;
}
public void setDeviceCode(String deviceCode) {
this.deviceCode = deviceCode;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public Long getDeviceType() {
return deviceType;
}
public void setDeviceType(Long deviceType) {
this.deviceType = deviceType;
}
public String getUseState() {
return useState;
}
public void setUseState(String useState) {
this.useState = useState;
}
public String getDeviceState() {
return deviceState;
}
public void setDeviceState(String deviceState) {
this.deviceState = deviceState;
}
}

@ -1,6 +1,7 @@
package com.ruoyi.api.mapper;
import com.ruoyi.api.domain.BroadCountNumber;
import com.ruoyi.api.domain.NoPowerDevice;
import com.ruoyi.manage.domain.BaseStore;
import com.ruoyi.manage.domain.LedgerRfid;
import org.springframework.stereotype.Repository;
@ -20,4 +21,6 @@ public interface BroadApiMapper {
List<BroadCountNumber> getCountNumberById(int id);
List<LedgerRfid> getLedgerByCode(String locationCode);
List<NoPowerDevice> getDevice(String storeName);
}

@ -1,7 +1,10 @@
package com.ruoyi.api.service.impl;
import com.ruoyi.api.domain.BroadCountNumber;
import com.ruoyi.api.domain.NoPowerDevice;
import com.ruoyi.api.mapper.BroadApiMapper;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.manage.domain.BaseStore;
import com.ruoyi.manage.domain.LedgerRfid;
import org.springframework.beans.factory.annotation.Autowired;
@ -15,9 +18,8 @@ import java.util.List;
*/
@Service
public class BroadApiService {
@Autowired
private BroadApiMapper mapper;
@Autowired
private BroadApiMapper mapper;
public List<BaseStore> getArea() {
@ -31,4 +33,9 @@ private BroadApiMapper mapper;
public List<LedgerRfid> getLedgerByCode(String locationCode) {
return mapper.getLedgerByCode(locationCode);
}
@DataSource(value = DataSourceType.SLAVE)
public List<NoPowerDevice> getDevice(String storeName) {
return mapper.getDevice(storeName);
}
}

@ -245,7 +245,7 @@
</select>
<!--完成任务-->
<update id="updataInspectionTaskByObjid">
UPDATE record_inspection_task SET task_state = #{state},remark = #{remark} WHERE objid = #{tableId};
UPDATE record_inspection_task SET task_state = #{state},remark = #{remark},update_time=now() WHERE objid = #{tableId};
</update>
<insert id="insertInspetionPictrue">

@ -29,6 +29,20 @@
where is_scrap = 1
and location_code = #{locationCode}
</select>
<resultMap id="DeviceResult" type="com.ruoyi.api.domain.NoPowerDevice">
<result property="deviceCode" column="device_code" />
<result property="deviceName" column="device_name" />
<result property="deviceType" column="device_type" />
<result property="useState" column="use_state" />
<result property="deviceState" column="device_state" />
<result property="locationName" column="location_name" />
</resultMap>
<select id="getDevice" resultMap="DeviceResult">
select device_code, device_name, use_state, device_state, location_name from device_base_info where location_name=#{storeName}
</select>
</mapper>

@ -32,7 +32,7 @@ public class MimeTypeUtils
// word excel powerpoint
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
// 压缩文件
"rar", "zip", "gz", "bz2",
"rar", "zip", "gz", "bz2", "7z",
// 视频格式
"mp4", "avi", "rmvb",
// pdf

@ -61,7 +61,6 @@ public class RecordInspectionController extends BaseController {
public AjaxResult print(String ids) {
System.out.println(ids);
List<RecordInspection> list = recordInspectionService.selectListByids(ids);
List<RecordInspectionTask> infolist=iRecordInspectionTaskService.selectTaskInfoByInspectionId(ids);
Map<String,List> map=new HashMap<String,List>();
map.put("list",list);

@ -25,7 +25,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
*
* @author wangh
* @date 2024-01-18
*/
@ -56,13 +56,26 @@ public class RecordOutController extends BaseController
@RequiresPermissions("manage:record_out:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(RecordOut recordOut)
public TableDataInfo list(RecordOutSort recordOutSort)
{
startPage();
List<RecordOut> list = recordOutService.selectRecordOutList(recordOut);
// List<RecordOut> list = recordOutService.selectRecordOutList(recordOut);
List<RecordOutSort> list=recordOutService.selectCountRecord(recordOutSort);
return getDataTable(list);
}
@PostMapping("/childList")
@ResponseBody
public TableDataInfo list(RecordOut recordOut)
{
// startPage();
// List<RecordOut> list = recordOutService.selectRecordOutList(recordOut);
List<RecordOutSort> list=recordOutService.selectRecordOutChildList(recordOut);
return getDataTable(list);
}
/**
*
*/

@ -36,6 +36,15 @@ public class RecordInspectionTask extends BaseEntity
@Excel(name = "完成状态")
private String taskState;
private String imgPath;
private int sanQty;
public int getSanQty() {
return sanQty;
}
public void setSanQty(int sanQty) {
this.sanQty = sanQty;
}
public String getImgPath() {
return imgPath;

@ -1,10 +1,14 @@
package com.ruoyi.manage.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import javax.xml.crypto.Data;
import java.util.Date;
/**
* record_out
*
@ -14,7 +18,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
public class RecordOutSort extends BaseEntity
{
private static final long serialVersionUID = 1L;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
/** 机位码 */
@Excel(name = "机位码")
private String locationCode;
@ -37,6 +42,15 @@ public class RecordOutSort extends BaseEntity
return recordCount;
}
@Override
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
}

@ -77,4 +77,8 @@ public interface RecordOutMapper
* @return
*/
public List<RecordOut> selectByLocationCode(String locationCode);
List<RecordOutSort> selectCountRecord(RecordOutSort recordOutSort);
List<RecordOutSort> selectRecordOutChildList(RecordOut recordOut);
}

@ -76,4 +76,8 @@ public interface IRecordOutService
* @return
*/
public List<RecordOut> selectByLocationCode(String locationCode);
List<RecordOutSort> selectRecordOutChildList(RecordOut recordOut);
List<RecordOutSort> selectCountRecord(RecordOutSort recordOutSort);
}

@ -113,4 +113,15 @@ public class RecordOutServiceImpl implements IRecordOutService {
public List<RecordOut> selectByLocationCode(String locationCode) {
return recordOutMapper.selectByLocationCode(locationCode);
}
@Override
public List<RecordOutSort> selectRecordOutChildList(RecordOut recordOut) {
return recordOutMapper.selectRecordOutChildList(recordOut);
}
@Override
public List<RecordOutSort> selectCountRecord(RecordOutSort recordOutSort) {
return recordOutMapper.selectCountRecord(recordOutSort);
}
}

@ -47,8 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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>
<if test="params.beginCheckTime != null and params.beginCheckTime != '' and params.endCheckTime != null and params.endCheckTime != ''">
and create_time between #{params.beginCheckTime} and date(#{params.endCheckTime})+1
</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

@ -12,10 +12,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="planePosition" column="plane_position" />
<result property="taskState" column="task_state" />
<result property="imgPath" column="img_path" />
<result property="updateTime" column="update_time" />
<result property="sanQty" column="sanQty" />
</resultMap>
<sql id="selectRecordInspectionTaskVo">
select objid, inspection_id, area_id, area_name, plane_position, task_state from record_inspection_task
select objid, inspection_id, area_id, area_name, plane_position, task_state,update_time from record_inspection_task
</sql>
<select id="selectRecordInspectionTaskList" parameterType="RecordInspectionTask" resultMap="RecordInspectionTaskResult">
@ -74,11 +76,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="iRecordInspectionTaskService" resultMap="RecordInspectionTaskResult">
select rit.objid, rit.inspection_id, area_id, area_name, plane_position, task_state,
rii.img_path
select rit.objid,
rit.inspection_id,
area_id,
area_name,
plane_position,
sanQty,
task_state,
rii.img_path
from record_inspection_task rit
left join bg_wheel_chocks.record_inspection_img rii on rit.objid = rii.task_id
left join record_inspection_img rii on rit.objid = rii.task_id
left join (select count(inspection_id) as sanQty, location_code, inspection_id
from record_inspection_info
where inspection_id in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
group by location_code, inspection_id) as info
on info.inspection_id = rit.inspection_id and info.location_code = plane_position
where rit.inspection_id in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.manage.mapper.RecordOutMapper">
<resultMap type="RecordOut" id="RecordOutResult">
<result property="objid" column="objid" />
<result property="epcCode" column="epc_code" />
@ -12,13 +12,11 @@ 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" />-->
<resultMap type="com.ruoyi.manage.domain.RecordOutSort" id="RecordOutSortResult">
<result property="locationCode" column="location_code" />
<!-- <result property="createTime" column="create_time" />-->
<result property="createTime" column="create_time" />
<result property="createTime" column="createTime" />
<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
@ -26,13 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRecordOutList" parameterType="RecordOut" resultMap="RecordOutResult">
<include refid="selectRecordOutVo"/>
<where>
<where>
<if test="epcCode != null and epcCode != ''"> and epc_code = #{epcCode}</if>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
<if test="useUser != null and useUser != ''"> and use_user = #{useUser}</if>
</where>
</select>
<select id="selectRecordOutByObjid" parameterType="Long" resultMap="RecordOutResult">
<include refid="selectRecordOutVo"/>
where objid = #{objid}
@ -84,10 +82,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteRecordOutByObjids" parameterType="String">
delete from record_out where objid in
delete from record_out where objid in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
</delete>
<select id="selectCountRecord" resultMap="RecordOutSortResult">
select date(create_time) as createTime, count(objid) as record_count
from record_out
<where>
<if test="params.beginCheckTime != null and params.beginCheckTime != '' and params.endCheckTime != null and params.endCheckTime != ''">
and create_time between #{params.beginCheckTime} and date( #{params.endCheckTime})+1
</if>
</where>
group by createTime;
</select>
<select id="selectRecordOutChildList" resultMap="RecordOutResult" parameterType="RecordOut">
select objid, epc_code, location_code, use_user, create_by, create_time from record_out
where date (create_time) = #{createTime}
</select>
</mapper>

@ -189,10 +189,10 @@
field: 'epcCode',
title: 'RFID编码'
},
// {
// field: 'batchCode',
// title: '批次码'
// },
{
field: 'batchCode',
title: '批次码'
},
{
field: 'recordCount',
title: '数量',

@ -18,12 +18,19 @@
margin-top: 12px;
}
.printList .item .topTable {
text-align: center;
display: flex;
justify-content: space-between;
background-color: #3333
}
.printList .item .card {
display: inline-block;
width: calc(48% - 2px);
margin: 12px 1% 0 1%;
border: 1px solid #1111;
height: 206px;
height: 180px;
}
.printList .item .card .left, .printList .item .card .right {
@ -50,51 +57,69 @@
width: 100%;
height: 100%;
}
@media print {
.printList {
width: 700px;
}
.printList .item .card {
height: 144px;
}
.printList .item .topTable {
background-color: #3333 !important;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
</style>
<body>
<div class="printList" id="printList">
<!-- <div class="item">-->
<!-- <div style="display: flex; justify-content: space-between;">-->
<!-- <div>巡检时间2020-00-00 000000</div>-->
<!-- <div>巡检数量11</div>-->
<!-- <div>正常数量11</div>-->
<!-- <div>异常数量11</div>-->
<!-- <div>跳过数量11</div>-->
<!-- </div>-->
<!-- <div class="card">-->
<!-- <div class="left">-->
<!-- <div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;">-->
<!-- <div>机坪名称:1号坪近机位</div>-->
<!-- <div>机位码:111</div>-->
<!-- <div>完成状态:已完成</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="right">-->
<!-- <div class="image">-->
<!-- <img src="/img/main_bg.png" alt="">-->
<!-- </div>-->
<!-- <div class="image">-->
<!-- <img src="/img/main_bg.png" alt="">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="card">-->
<!-- <div class="left">-->
<!-- <div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;">-->
<!-- <div>机坪名称:1号坪近机位</div>-->
<!-- <div>机位码:111</div>-->
<!-- <div>完成状态:已完成</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="right">-->
<!-- <div class="image1">-->
<!-- <img src="/img/main_bg.png" alt="">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="item">-->
<!-- <div style="display: flex; justify-content: space-between;">-->
<!-- <div>巡检时间2020-00-00 000000</div>-->
<!-- <div>巡检数量11</div>-->
<!-- <div>正常数量11</div>-->
<!-- <div>异常数量11</div>-->
<!-- <div>跳过数量11</div>-->
<!-- </div>-->
<!-- <div class="card">-->
<!-- <div class="left">-->
<!-- <div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;">-->
<!-- <div>机坪名称:1号坪近机位</div>-->
<!-- <div>机位码:111</div>-->
<!-- <div>完成状态:已完成</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="right">-->
<!-- <div class="image">-->
<!-- <img src="/img/main_bg.png" alt="">-->
<!-- </div>-->
<!-- <div class="image">-->
<!-- <img src="/img/main_bg.png" alt="">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="card">-->
<!-- <div class="left">-->
<!-- <div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;">-->
<!-- <div>机坪名称:1号坪近机位</div>-->
<!-- <div>机位码:111</div>-->
<!-- <div>完成状态:已完成</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="right">-->
<!-- <div class="image1">-->
<!-- <img src="/img/main_bg.png" alt="">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<th:block th:include="include :: footer"/>
<script src="/js/jQuery.print.js"></script>
<script th:inline="javascript">
var prefix = ctx + "manage/record_inspection";
let ids = location.search.split('ids=')?.[1]?.split('&')?.[0]
@ -102,45 +127,54 @@
e.data.list.forEach((i, k) => {
let cardList = e.data.infolist.filter(v => v.inspectionId === i.inspectionId)
let cardIds = [...new Set(cardList.map(v=>v.objid))]
let cardIds = [...new Set(cardList.map(v => v.objid))]
let card = ``
cardIds.forEach(v => {
let data = cardList.filter(i=>i.objid ===v)
card += `
<div class="card">
<div class="left">
let data = cardList.filter(i => i.objid === v)
card += `
<div class="card" ${data.length > 2 ? `style="width:calc(98% - 2px)"` : ''}>
<div class="left" ${data.length > 2 ? `style="width:calc(25% - 2px)"` : ''}>
<div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;">
<div><span style="display: inline-block;width: 70px;text-align: right">机坪名称:</span>${data[0].areaName || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">机位码:</span>${data[0].planePosition || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">完成状态:</span>${data[0].taskState || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">机坪名称: </span><span style="display: inline-block;width:12px; "> </span>${data[0].areaName || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">机位码: </span><span style="display: inline-block;width:12px; "> </span>${data[0].planePosition || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">扫码数量: </span><span style="display: inline-block;width:12px; "> </span>${data[0].sanQty || '0'}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">巡检状态: </span><span style="display: inline-block;width:12px; "> </span>${data[0].taskState || ''}</div>
</div>
</div>
<div class="right">
<div class="right" ${data.length > 2 ? `style="width:calc(75% - 2px)"` : ''}>
${
data.map(vv=>{
return `
<div class="image1" style="width:calc(${100/data.length}% - ${data.length}px)">
${vv.imgPath ? `<img src="/img/11.jpg" alt="">` : ''}
data.map(vv => {
return `
<div class="image1" style="width:calc(${100 / data.length}% - ${data.length}px)">
${vv.imgPath ? `<img src="${vv.imgPath}" alt="">` : ''}
</div>`
}).join('')
}
}).join('')
}
</div>
</div>`
})
let html = `
<div class="item">
<div style="text-align:center;display: flex; justify-content: space-between;background-color: #3333">
<div style="width: 100%">巡检时间<br>${i.inspectionTime}</div>
<div style="width: 100%">巡检数量<br>${i.totalNumber || 0}</div>
<div style="width: 100%">正常数量<br>${i.normalNumber || 0}</div>
<div style="width: 100%">异常数量<br>${i.abnormalNumber || 0}</div>
<div style="width: 100%">跳过数量<br>${i.skipNumber || 0}</div>
<div class="topTable" >
<div style="width: 100%">巡检时间<br>${i.inspectionTime}</div>
<div style="width: 100%">巡检数量<br>${i.totalNumber || 0}</div>
<div style="width: 100%">正常数量<br>${i.normalNumber || 0}</div>
<div style="width: 100%">异常数量<br>${i.abnormalNumber || 0}</div>
<div style="width: 100%">跳过数量<br>${i.skipNumber || 0}</div>
</div>
${card}
</div>`
$('#printList').append(html)
})
});
function submitHandler() {
console.log($.print)
$("#printList").print();
// var printContents = $("#printList").html();
// var myWindow = window.open('', 'myDiv', 'height=400,width=600');
}
</script>
</body>
</html>

@ -182,9 +182,9 @@
// 选中数据
function checkItem() {
var arrays = $.table.selectColumns("inspectionId");
$.modal.openFull('打印','/manage/record_inspection/printHtml?ids='+arrays.toString());
$.modal.open('打印','/manage/record_inspection/printHtml?ids='+arrays.toString(),1200,800);
// alert(arrays);
var data = {"ids": arrays.toString()};
// var data = {"ids": arrays.toString()};
// $.operate.submit(prefix + "/print", "get", "json", data);
// $.get(prefix + "/print",data,(e)=>{
// console.log(e)

@ -90,15 +90,15 @@
checkbox: true
},
{
field: 'objid',
title: '主键',
visible: false
}, {
field: 'inspectionId',
title: '巡检id',
visible: false
},
{
field: 'objid',
title: '主键',
visible: false
},
{
field: 'locationCode',
title: '机位码'

@ -92,7 +92,7 @@
title: '主键',
visible: false
},
{
{
field: 'inspectionId',
title: 'id',
visible: false
@ -113,6 +113,9 @@
formatter: function (value, row, index) {
return $.table.selectDictLabel(taskStateDatas, value);
}
}, {
field: 'updateTime',
title: '完成时间'
},
{
title: '操作',
@ -137,7 +140,7 @@
initinspectionTable = function (index, row, $detail) {
var [childTable,childTable1] = $detail.html('<div class="col-sm-12">\n' +
var [childTable, childTable1] = $detail.html('<div class="col-sm-12">\n' +
' <div class="tabs-container">\n' +
' <ul class="nav nav-tabs">\n' +
' <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 第一个选项卡</a>\n' +
@ -147,10 +150,10 @@
' </ul>\n' +
' <div class="tab-content">\n' +
' <div id="tab-1" class="tab-pane active">\n' +
'<table class="table1" style="table-layout:fixed"></table>'+
'<table class="table1" style="table-layout:fixed"></table>' +
' </div>\n' +
' <div id="tab-2" class="tab-pane">\n' +
'<table style="table-layout:fixed"></table>'+
'<table style="table-layout:fixed"></table>' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
@ -165,13 +168,13 @@
contentType: "application/x-www-form-urlencoded",
queryParams: {
inspectionId: row.inspectionId,
locationCode:row.planePosition
locationCode: row.planePosition
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index+1
return index + 1
}
},
{
@ -195,7 +198,8 @@
title: '提交时间'
}
]});
]
});
$(childTable1).bootstrapTable({
url: ctx + "manage/record_inspection_img/list",
method: 'post',

@ -10,7 +10,7 @@
<form id="formId">
<div class="select-list">
<ul>
<li>
<!-- <li>
<label>RFID</label>
<input type="text" name="epcCode"/>
</li>
@ -22,7 +22,16 @@
<li>
<label>领用人:</label>
<input type="text" name="useUser"/>
</li>-->
<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>
<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>
@ -65,49 +74,73 @@
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "轮挡出库记录",
detailView: true,
onExpandRow: function (index, row, $detail) {
initChildTable(index, row, $detail);
},
sortName:"createTime" ,
sortOrder: "desc",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '主键',
visible: false
},
{
field: 'epcCode',
title: 'RFID编码'
},
{
field: 'locationCode',
title: '机位码'
},
{
field: 'useUser',
title: '领用人'
},
{
field: 'createBy',
title: '出库人'
},
{
field: 'createTime',
title: '出库时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<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('');
}
}]
{
field: 'createTime',
title: '出库时间'
}, {
field: 'recordCount',
title: '数量'
},
]
};
$.table.init(options);
});
initChildTable = function (index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(childTable).bootstrapTable({
url: prefix + "/childList",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
createTime: row.createTime
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index+1
}
},
{
field: 'objid',
title: '主键',
visible: false
},
{
field: 'epcCode',
title: 'RFID编码'
},
{
field: 'locationCode',
title: '机位码'
},
{
field: 'useUser',
title: '领用人'
},
{
field: 'createBy',
title: '出库人'
},
{
field: 'createTime',
title: '出库时间'
}]
});
};
</script>
</body>
</html>
Loading…
Cancel
Save