| | |
| | | @Excel(name = "设备名称") |
| | | private String deviceName; |
| | | |
| | | /** 出入库类型(in /out) */ |
| | | @Excel(name = "出入库类型", readConverterExp = "i=n,/=out") |
| | | /** 类型(设备,材料) */ |
| | | @Excel(name = "出入库类型", readConverterExp = "类型(设备,材料)") |
| | | private String type; |
| | | |
| | | /** 出入库时间 */ |
| | | @Excel(name = "出入库时间") |
| | | private String transactionDate; |
| | | /** 出库时间 */ |
| | | @Excel(name = "出库时间") |
| | | private String outboundDate; |
| | | |
| | | /** 入库时间 */ |
| | | @Excel(name = "入库时间") |
| | | private String inboundDate; |
| | | |
| | | /** 经办人 */ |
| | | @Excel(name = "经办人") |
| | | private String optUser; |
| | | |
| | | /** 使用人 */ |
| | | @Excel(name = "使用人") |
| | | @Excel(name = "负责人") |
| | | private String applyUser; |
| | | |
| | | /** 出入库数量 */ |
| | |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getType() |
| | | { |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | public void setTransactionDate(String transactionDate) |
| | | { |
| | | this.transactionDate = transactionDate; |
| | | |
| | | public String getOutboundDate() { |
| | | return outboundDate; |
| | | } |
| | | |
| | | public String getTransactionDate() |
| | | { |
| | | return transactionDate; |
| | | public void setOutboundDate(String outboundDate) { |
| | | this.outboundDate = outboundDate; |
| | | } |
| | | public void setOptUser(String optUser) |
| | | { |
| | | |
| | | public String getInboundDate() { |
| | | return inboundDate; |
| | | } |
| | | |
| | | public void setInboundDate(String inboundDate) { |
| | | this.inboundDate = inboundDate; |
| | | } |
| | | |
| | | public void setOptUser(String optUser) { |
| | | this.optUser = optUser; |
| | | } |
| | | |
| | |
| | | .append("deviceId", getDeviceId()) |
| | | .append("deviceCode", getDeviceCode()) |
| | | .append("deviceName", getDeviceName()) |
| | | .append("type", getType()) |
| | | .append("transactionDate", getTransactionDate()) |
| | | .append("optUser", getOptUser()) |
| | | .append("applyUser", getApplyUser()) |
| | | .append("number", getNumber()) |
| | |
| | | item.setProjectId(projectId); |
| | | item.setProjectName(project.getFullName()); |
| | | |
| | | // 转换出入库类型 |
| | | String proTypeCode = RecordType.getKeyByName(item.getType()); |
| | | item.setType(proTypeCode); |
| | | |
| | | // 转换设备编码 |
| | | String deviceCode = item.getDeviceCode(); |
| | | if (!ObjectUtils.isEmpty(deviceCode)){ |
| | | Device param = new Device(); |
| | | param.setCode(deviceCode); |
| | | List<Device> devices = deviceService.selectDeviceList(param); |
| | | if (!ObjectUtils.isEmpty(devices)){ |
| | | Device device = devices.get(0); |
| | | item.setDeviceId(device.getId()); |
| | | item.setDeviceCode(device.getCode()); |
| | | item.setDeviceName(device.getName()); |
| | | } |
| | | } |
| | | |
| | | item.setCreateDate(DateUtils.getNowDate()); |
| | | insertDeviceLog(item); |
| | | } |
| | |
| | | private List<DeviceLog> readData(String filepath) { |
| | | ExcelReader reader = ExcelUtil.getReader(filepath, 0); |
| | | reader.addHeaderAlias("出入库单子号", "code"); |
| | | reader.addHeaderAlias("设备编码", "deviceCode"); |
| | | reader.addHeaderAlias("出入库类型", "type"); |
| | | reader.addHeaderAlias("出入库时间", "transactionDate"); |
| | | reader.addHeaderAlias("设备名称", "deviceName"); |
| | | reader.addHeaderAlias("类型", "type"); |
| | | reader.addHeaderAlias("入库时间", "inboundDate"); |
| | | reader.addHeaderAlias("出库时间", "outboundDate"); |
| | | reader.addHeaderAlias("经办人", "optUser"); |
| | | reader.addHeaderAlias("使用人", "applyUser"); |
| | | reader.addHeaderAlias("负责人", "applyUser"); |
| | | reader.addHeaderAlias("出入库数量", "number"); |
| | | reader.addHeaderAlias("备注", "remark"); |
| | | |
| | |
| | | <result property="deviceCode" column="device_code" /> |
| | | <result property="deviceName" column="device_name" /> |
| | | <result property="type" column="type" /> |
| | | <result property="transactionDate" column="transaction_date" /> |
| | | <result property="outboundDate" column="outbound_date" /> |
| | | <result property="inboundDate" column="inbound_date" /> |
| | | <result property="optUser" column="opt_user" /> |
| | | <result property="applyUser" column="apply_user" /> |
| | | <result property="number" column="number" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectDeviceLogVo"> |
| | | select id, code, project_id, project_name, device_id, device_code, device_name, type, transaction_date, opt_user, apply_user, number, create_date, remark from js_device_log |
| | | select id, code, project_id, project_name, device_id, device_code, device_name, type, outbound_date, inbound_date, opt_user, apply_user, number, create_date, remark from js_device_log |
| | | </sql> |
| | | |
| | | <select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult"> |
| | |
| | | <if test="deviceCode != null and deviceCode != ''">device_code,</if> |
| | | <if test="deviceName != null and deviceName != ''">device_name,</if> |
| | | <if test="type != null and type != ''">type,</if> |
| | | <if test="transactionDate != null and transactionDate != ''">transaction_date,</if> |
| | | <if test="outboundDate != null and outboundDate != ''">outbound_date,</if> |
| | | <if test="inboundDate != null and inboundDate != ''">inbound_date,</if> |
| | | <if test="optUser != null and optUser != ''">opt_user,</if> |
| | | <if test="applyUser != null and applyUser != ''">apply_user,</if> |
| | | <if test="number != null and number != ''">number,</if> |
| | |
| | | <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if> |
| | | <if test="deviceName != null and deviceName != ''">#{deviceName},</if> |
| | | <if test="type != null and type != ''">#{type},</if> |
| | | <if test="transactionDate != null and transactionDate != ''">#{transactionDate},</if> |
| | | <if test="outboundDate != null and outboundDate != ''">#{outboundDate},</if> |
| | | <if test="inboundDate != null and inboundDate != ''">#{inboundDate},</if> |
| | | <if test="optUser != null and optUser != ''">#{optUser},</if> |
| | | <if test="applyUser != null and applyUser != ''">#{applyUser},</if> |
| | | <if test="number != null and number != ''">#{number},</if> |
| | |
| | | <if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if> |
| | | <if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if> |
| | | <if test="type != null and type != ''">type = #{type},</if> |
| | | <if test="transactionDate != null and transactionDate != ''">transaction_date = #{transactionDate},</if> |
| | | <if test="outboundDate != null and outboundDate != ''">outbound_date = #{outboundDate},</if> |
| | | <if test="inboundDate != null and inboundDate != ''">inbound_date = #{inboundDate},</if> |
| | | <if test="optUser != null and optUser != ''">opt_user = #{optUser},</if> |
| | | <if test="applyUser != null and applyUser != ''">apply_user = #{applyUser},</if> |
| | | <if test="number != null and number != ''">number = #{number},</if> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">项目名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="projectName" 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="deviceCode" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">设备名称:</label> |
| | | <label class="col-sm-3 control-label">名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="deviceName" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库类型:</label> |
| | | <label class="col-sm-3 control-label">类型:</label> |
| | | <div class="col-sm-8"> |
| | | <select name="type" class="form-control m-b" th:with="type=${@dict.getType('device_log_type')}"> |
| | | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库时间:</label> |
| | | <label class="col-sm-3 control-label">入库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="transactionDate" class="form-control" type="text"> |
| | | <input name="inboundDate" 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="outboundDate" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">使用人:</label> |
| | | <label class="col-sm-3 control-label">负责人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="applyUser" class="form-control" type="text"> |
| | | </div> |
| | |
| | | <input name="number" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">备注:</label> |
| | | <div class="col-sm-8"> |
| | | <textarea id="remark" name="remark" class="form-control"></textarea> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | |
| | | <input type="text" name="code"/> |
| | | </li> |
| | | <li> |
| | | <p>项目名称:</p> |
| | | <input type="text" name="projectName"/> |
| | | </li> |
| | | <li> |
| | | <p>设备名称:</p> |
| | | <p>名称:</p> |
| | | <input type="text" name="deviceName"/> |
| | | </li> |
| | | <li> |
| | | <p>出入库类型:</p> |
| | | <p>设备/材料类型:</p> |
| | | <select name="type" th:with="type=${@dict.getType('device_log_type')}"> |
| | | <option value="">所有</option> |
| | | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
| | |
| | | <input type="text" name="optUser"/> |
| | | </li> |
| | | <li> |
| | | <p>使用人:</p> |
| | | <p>负责人:</p> |
| | | <input type="text" name="applyUser"/> |
| | | </li> |
| | | <li> |
| | |
| | | }, |
| | | { |
| | | field : 'projectName', |
| | | title : '项目名称' |
| | | title : '场地名称', |
| | | visible: false |
| | | }, |
| | | { |
| | | field : 'deviceCode', |
| | | title : '设备编码' |
| | | title : '编号', |
| | | visible: false |
| | | }, |
| | | { |
| | | field : 'deviceName', |
| | | title : '设备名称' |
| | | title : '名称' |
| | | }, |
| | | { |
| | | field : 'type', |
| | | title : '出入库类型', |
| | | title : '设备/材料类型', |
| | | formatter: function(value, row, index) { |
| | | return $.table.selectDictLabel(typeDatas, value); |
| | | } |
| | | }, |
| | | { |
| | | field : 'transactionDate', |
| | | title : '出入库时间' |
| | | field : 'inboundDate', |
| | | title : '入库时间' |
| | | }, |
| | | { |
| | | field : 'outboundDate', |
| | | title : '出库时间' |
| | | }, |
| | | { |
| | | field : 'optUser', |
| | |
| | | }, |
| | | { |
| | | field : 'applyUser', |
| | | title : '使用人' |
| | | title : '负责人' |
| | | }, |
| | | { |
| | | field : 'number', |
| | | title : '出入库数量' |
| | | title : '数量' |
| | | }, |
| | | { |
| | | field : 'remark', |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">项目名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="projectName" th:field="*{projectName}" 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="deviceCode" th:field="*{deviceCode}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">设备名称:</label> |
| | | <label class="col-sm-3 control-label">名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="deviceName" th:field="*{deviceName}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库类型:</label> |
| | | <label class="col-sm-3 control-label">类型:</label> |
| | | <div class="col-sm-8"> |
| | | <select name="type" class="form-control m-b" th:with="type=${@dict.getType('device_log_type')}"> |
| | | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库时间:</label> |
| | | <label class="col-sm-3 control-label">入库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="transactionDate" th:field="*{transactionDate}" class="form-control" type="text"> |
| | | <input name="inboundDate" th:field="*{inboundDate}" 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="outboundDate" th:field="*{outboundDate}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">使用人:</label> |
| | | <label class="col-sm-3 control-label">负责人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="applyUser" th:field="*{applyUser}" class="form-control" type="text"> |
| | | </div> |
| | |
| | | <input name="number" th:field="*{number}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">备注:</label> |
| | | <div class="col-sm-8"> |
| | | <textarea id="remark" th:field="*{remark}" name="remark" class="form-control"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | |
| | | </form> |
| | | </div> |
| | | |
| | | <div class="btn-group-sm" id="toolbar" role="group"> |
| | | |
| | | |
| | | </div> |
| | | |
| | | <div class="col-sm-12 select-table table-striped"> |
| | | <span>1、单个或者多个文件请以.ZIP压缩包的形式上传<br> </span> |
| | | <span>2、标准文件不允许包含特殊字符:空格 、正反斜线、问号、星号等<br> </span> |
| | | <span>1、单个或者多个文件请以.ZIP压缩包的形式上传,把单个或者多个文件放到文件夹中,压缩文件夹为zip格式<br> </span> |
| | | <span>1、附件名称需要与系统内的资料名称一致<br> </span> |
| | | <span>2、文件不允许包含特殊字符:空格 、正反斜线、问号、星号等<br> </span> |
| | | <span>3、上传文件经过了 解压 、 移动 、遍历 、更新数据库等多个步骤,请耐心等待<br> </span> |
| | | </div> |
| | | |