From e2cf4dc0a1142716688e853d226c3e4ce66383da Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期三, 22 五月 2024 18:21:36 +0800
Subject: [PATCH] 管材管理
---
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java | 126 +++++++
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/add.html | 117 ++++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/TubLog.java | 192 +++++++++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java | 61 +++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java | 90 +++++
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml | 111 ++++++
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html | 118 ++++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java | 61 +++
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/TubLog.html | 134 +++++++
9 files changed, 1,010 insertions(+), 0 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
new file mode 100644
index 0000000..585292e
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
@@ -0,0 +1,126 @@
+package com.javaweb.geo.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.javaweb.common.annotation.Log;
+import com.javaweb.common.enums.BusinessType;
+import com.javaweb.geo.domain.TubLog;
+import com.javaweb.geo.service.ITubLogService;
+import com.javaweb.common.core.controller.BaseController;
+import com.javaweb.common.core.domain.AjaxResult;
+import com.javaweb.common.utils.poi.ExcelUtil;
+import com.javaweb.common.core.page.TableDataInfo;
+
+/**
+ * 鏉愭枡鍑哄叆搴撹褰旵ontroller
+ *
+ * @author cxy
+ * @date 2024-05-22
+ */
+@Controller
+@RequestMapping("/geo/TubLog")
+public class TubLogController extends BaseController
+{
+ private String prefix = "geo/TubLog";
+
+ @Autowired
+ private ITubLogService tubLogService;
+
+ @RequiresPermissions("geo:TubLog:view")
+ @GetMapping()
+ public String TubLog()
+ {
+ return prefix + "/TubLog";
+ }
+
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰曞垪琛�
+ */
+ @RequiresPermissions("geo:TubLog:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(TubLog tubLog)
+ {
+ startPage();
+ List<TubLog> list = tubLogService.selectTubLogList(tubLog);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭鏉愭枡鍑哄叆搴撹褰曞垪琛�
+ */
+ @RequiresPermissions("geo:TubLog:export")
+ @Log(title = "鏉愭枡鍑哄叆搴撹褰�", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(TubLog tubLog)
+ {
+ List<TubLog> list = tubLogService.selectTubLogList(tubLog);
+ ExcelUtil<TubLog> util = new ExcelUtil<TubLog>(TubLog.class);
+ return util.exportExcel(list, "TubLog");
+ }
+
+ /**
+ * 鏂板鏉愭枡鍑哄叆搴撹褰�
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 鏂板淇濆瓨鏉愭枡鍑哄叆搴撹褰�
+ */
+ @RequiresPermissions("geo:TubLog:add")
+ @Log(title = "鏉愭枡鍑哄叆搴撹褰�", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(TubLog tubLog)
+ {
+ return toAjax(tubLogService.insertTubLog(tubLog));
+ }
+
+ /**
+ * 淇敼鏉愭枡鍑哄叆搴撹褰�
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Integer id, ModelMap mmap)
+ {
+ TubLog tubLog = tubLogService.selectTubLogById(id);
+ mmap.put("tubLog", tubLog);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 淇敼淇濆瓨鏉愭枡鍑哄叆搴撹褰�
+ */
+ @RequiresPermissions("geo:TubLog:edit")
+ @Log(title = "鏉愭枡鍑哄叆搴撹褰�", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(TubLog tubLog)
+ {
+ return toAjax(tubLogService.updateTubLog(tubLog));
+ }
+
+ /**
+ * 鍒犻櫎鏉愭枡鍑哄叆搴撹褰�
+ */
+ @RequiresPermissions("geo:TubLog:remove")
+ @Log(title = "鏉愭枡鍑哄叆搴撹褰�", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(tubLogService.deleteTubLogByIds(ids));
+ }
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/TubLog.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/TubLog.java
new file mode 100644
index 0000000..142e10d
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/TubLog.java
@@ -0,0 +1,192 @@
+package com.javaweb.geo.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.javaweb.common.annotation.Excel;
+import com.javaweb.common.core.domain.BaseEntity;
+import java.util.Date;
+
+/**
+ * 鏉愭枡鍑哄叆搴撹褰曞璞� js_tub_log
+ *
+ * @author cxy
+ * @date 2024-05-22
+ */
+public class TubLog extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 涓婚敭 */
+ private Integer id;
+
+ /** 鍑哄叆搴撳崟瀛愬彿 */
+ @Excel(name = "鍑哄叆搴撳崟瀛愬彿")
+ private String code;
+
+ /** 椤圭洰id */
+ private String projectId;
+
+ /** 绠℃潗鍚嶇О */
+ @Excel(name = "绠℃潗鍚嶇О")
+ private String tubName;
+
+ /** 绫诲瀷 */
+ @Excel(name = "绫诲瀷")
+ private String type;
+
+ /** 鍑哄簱鏃堕棿 */
+ @Excel(name = "鍑哄簱鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date outboundDate;
+
+ /** 鍏ュ簱鏃堕棿 */
+ @Excel(name = "鍏ュ簱鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date inboundDate;
+
+ /** 缁忓姙浜� */
+ @Excel(name = "缁忓姙浜�")
+ private String optUser;
+
+ /** 璐熻矗浜� */
+ @Excel(name = "璐熻矗浜�")
+ private String applyUser;
+
+ /** 鍑哄叆搴撴暟閲� */
+ @Excel(name = "鍑哄叆搴撴暟閲�")
+ private Double number;
+
+ /** 鏁版嵁鍗曚綅 */
+ @Excel(name = "鏁版嵁鍗曚綅")
+ private String unit;
+
+ /** 鏃堕棿 */
+ @Excel(name = "鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date createDate;
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setCode(String code)
+ {
+ this.code = code;
+ }
+
+ public String getCode()
+ {
+ return code;
+ }
+ public void setProjectId(String projectId)
+ {
+ this.projectId = projectId;
+ }
+
+ public String getProjectId()
+ {
+ return projectId;
+ }
+ public void setTubName(String tubName)
+ {
+ this.tubName = tubName;
+ }
+
+ public String getTubName()
+ {
+ return tubName;
+ }
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+ public void setOutboundDate(Date outboundDate)
+ {
+ this.outboundDate = outboundDate;
+ }
+
+ public Date getOutboundDate()
+ {
+ return outboundDate;
+ }
+ public void setInboundDate(Date inboundDate)
+ {
+ this.inboundDate = inboundDate;
+ }
+
+ public Date getInboundDate()
+ {
+ return inboundDate;
+ }
+ public void setOptUser(String optUser)
+ {
+ this.optUser = optUser;
+ }
+
+ public String getOptUser()
+ {
+ return optUser;
+ }
+ public void setApplyUser(String applyUser)
+ {
+ this.applyUser = applyUser;
+ }
+
+ public String getApplyUser()
+ {
+ return applyUser;
+ }
+ public void setNumber(Double number)
+ {
+ this.number = number;
+ }
+
+ public Double getNumber()
+ {
+ return number;
+ }
+ public void setUnit(String unit)
+ {
+ this.unit = unit;
+ }
+
+ public String getUnit()
+ {
+ return unit;
+ }
+ public void setCreateDate(Date createDate)
+ {
+ this.createDate = createDate;
+ }
+
+ public Date getCreateDate()
+ {
+ return createDate;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("code", getCode())
+ .append("projectId", getProjectId())
+ .append("tubName", getTubName())
+ .append("type", getType())
+ .append("outboundDate", getOutboundDate())
+ .append("inboundDate", getInboundDate())
+ .append("optUser", getOptUser())
+ .append("applyUser", getApplyUser())
+ .append("number", getNumber())
+ .append("unit", getUnit())
+ .append("createDate", getCreateDate())
+ .append("remark", getRemark())
+ .toString();
+ }
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
new file mode 100644
index 0000000..5c1b128
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
@@ -0,0 +1,61 @@
+package com.javaweb.geo.mapper;
+
+import com.javaweb.geo.domain.TubLog;
+import java.util.List;
+
+/**
+ * 鏉愭枡鍑哄叆搴撹褰昅apper鎺ュ彛
+ *
+ * @author cxy
+ * @date 2024-05-22
+ */
+public interface TubLogMapper
+{
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param id 鏉愭枡鍑哄叆搴撹褰旾D
+ * @return 鏉愭枡鍑哄叆搴撹褰�
+ */
+ public TubLog selectTubLogById(Integer id);
+
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰曞垪琛�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 鏉愭枡鍑哄叆搴撹褰曢泦鍚�
+ */
+ public List<TubLog> selectTubLogList(TubLog tubLog);
+
+ /**
+ * 鏂板鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 缁撴灉
+ */
+ public int insertTubLog(TubLog tubLog);
+
+ /**
+ * 淇敼鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 缁撴灉
+ */
+ public int updateTubLog(TubLog tubLog);
+
+ /**
+ * 鍒犻櫎鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param id 鏉愭枡鍑哄叆搴撹褰旾D
+ * @return 缁撴灉
+ */
+ public int deleteTubLogById(Integer id);
+
+ /**
+ * 鎵归噺鍒犻櫎鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
+ * @return 缁撴灉
+ */
+ public int deleteTubLogByIds(String[] ids);
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
new file mode 100644
index 0000000..428c1e8
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
@@ -0,0 +1,61 @@
+package com.javaweb.geo.service;
+
+import com.javaweb.geo.domain.TubLog;
+import java.util.List;
+
+/**
+ * 鏉愭枡鍑哄叆搴撹褰昐ervice鎺ュ彛
+ *
+ * @author cxy
+ * @date 2024-05-22
+ */
+public interface ITubLogService
+{
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param id 鏉愭枡鍑哄叆搴撹褰旾D
+ * @return 鏉愭枡鍑哄叆搴撹褰�
+ */
+ public TubLog selectTubLogById(Integer id);
+
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰曞垪琛�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 鏉愭枡鍑哄叆搴撹褰曢泦鍚�
+ */
+ public List<TubLog> selectTubLogList(TubLog tubLog);
+
+ /**
+ * 鏂板鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 缁撴灉
+ */
+ public int insertTubLog(TubLog tubLog);
+
+ /**
+ * 淇敼鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 缁撴灉
+ */
+ public int updateTubLog(TubLog tubLog);
+
+ /**
+ * 鎵归噺鍒犻櫎鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
+ * @return 缁撴灉
+ */
+ public int deleteTubLogByIds(String ids);
+
+ /**
+ * 鍒犻櫎鏉愭枡鍑哄叆搴撹褰曚俊鎭�
+ *
+ * @param id 鏉愭枡鍑哄叆搴撹褰旾D
+ * @return 缁撴灉
+ */
+ public int deleteTubLogById(Integer id);
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
new file mode 100644
index 0000000..c9ffa19
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
@@ -0,0 +1,90 @@
+package com.javaweb.geo.service.impl;
+
+import java.util.List;
+
+import com.javaweb.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.javaweb.geo.mapper.TubLogMapper;
+import com.javaweb.geo.domain.TubLog;
+import com.javaweb.geo.service.ITubLogService;
+import com.javaweb.common.core.text.Convert;
+
+/**
+ * 鏉愭枡鍑哄叆搴撹褰昐ervice涓氬姟灞傚鐞�
+ *
+ * @author cxy
+ * @date 2024-05-22
+ */
+@Service
+public class TubLogServiceImpl implements ITubLogService {
+ @Autowired
+ private TubLogMapper tubLogMapper;
+
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param id 鏉愭枡鍑哄叆搴撹褰旾D
+ * @return 鏉愭枡鍑哄叆搴撹褰�
+ */
+ @Override
+ public TubLog selectTubLogById(Integer id) {
+ return tubLogMapper.selectTubLogById(id);
+ }
+
+ /**
+ * 鏌ヨ鏉愭枡鍑哄叆搴撹褰曞垪琛�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 鏉愭枡鍑哄叆搴撹褰�
+ */
+ @Override
+ public List<TubLog> selectTubLogList(TubLog tubLog) {
+ return tubLogMapper.selectTubLogList(tubLog);
+ }
+
+ /**
+ * 鏂板鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertTubLog(TubLog tubLog) {
+ tubLog.setCreateDate(DateUtils.getNowDate());
+ return tubLogMapper.insertTubLog(tubLog);
+ }
+
+ /**
+ * 淇敼鏉愭枡鍑哄叆搴撹褰�
+ *
+ * @param tubLog 鏉愭枡鍑哄叆搴撹褰�
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateTubLog(TubLog tubLog) {
+ return tubLogMapper.updateTubLog(tubLog);
+ }
+
+ /**
+ * 鍒犻櫎鏉愭枡鍑哄叆搴撹褰曞璞�
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteTubLogByIds(String ids) {
+ return tubLogMapper.deleteTubLogByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 鍒犻櫎鏉愭枡鍑哄叆搴撹褰曚俊鎭�
+ *
+ * @param id 鏉愭枡鍑哄叆搴撹褰旾D
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteTubLogById(Integer id) {
+ return tubLogMapper.deleteTubLogById(id);
+ }
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
new file mode 100644
index 0000000..fd32d2b
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.javaweb.geo.mapper.TubLogMapper">
+
+ <resultMap type="TubLog" id="TubLogResult">
+ <result property="id" column="id" />
+ <result property="code" column="code" />
+ <result property="projectId" column="project_id" />
+ <result property="tubName" column="tub_name" />
+ <result property="type" column="type" />
+ <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" />
+ <result property="unit" column="unit" />
+ <result property="createDate" column="create_date" />
+ <result property="remark" column="remark" />
+ </resultMap>
+
+ <sql id="selectTubLogVo">
+ select id, code, project_id, tub_name, type, outbound_date, inbound_date, opt_user, apply_user, number, unit, create_date, remark from js_tub_log
+ </sql>
+
+ <select id="selectTubLogList" parameterType="TubLog" resultMap="TubLogResult">
+ <include refid="selectTubLogVo"/>
+ <where>
+ <if test="code != null and code != ''"> and code = #{code}</if>
+ <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
+ <if test="tubName != null and tubName != ''"> and tub_name like concat('%', #{tubName}, '%')</if>
+ <if test="type != null and type != ''"> and type = #{type}</if>
+ <if test="outboundDate != null "> and outbound_date = #{outboundDate}</if>
+ <if test="inboundDate != null "> and inbound_date = #{inboundDate}</if>
+ <if test="optUser != null and optUser != ''"> and opt_user = #{optUser}</if>
+ <if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
+ <if test="number != null "> and number = #{number}</if>
+ <if test="unit != null and unit != ''"> and unit = #{unit}</if>
+ <if test="createDate != null "> and create_date = #{createDate}</if>
+ </where>
+ </select>
+
+ <select id="selectTubLogById" parameterType="Integer" resultMap="TubLogResult">
+ <include refid="selectTubLogVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id">
+ insert into js_tub_log
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="code != null and code != ''">code,</if>
+ <if test="projectId != null and projectId != ''">project_id,</if>
+ <if test="tubName != null and tubName != ''">tub_name,</if>
+ <if test="type != null and type != ''">type,</if>
+ <if test="outboundDate != null ">outbound_date,</if>
+ <if test="inboundDate != null ">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 ">number,</if>
+ <if test="unit != null and unit != ''">unit,</if>
+ <if test="createDate != null ">create_date,</if>
+ <if test="remark != null and remark != ''">remark,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="code != null and code != ''">#{code},</if>
+ <if test="projectId != null and projectId != ''">#{projectId},</if>
+ <if test="tubName != null and tubName != ''">#{tubName},</if>
+ <if test="type != null and type != ''">#{type},</if>
+ <if test="outboundDate != null ">#{outboundDate},</if>
+ <if test="inboundDate != null ">#{inboundDate},</if>
+ <if test="optUser != null and optUser != ''">#{optUser},</if>
+ <if test="applyUser != null and applyUser != ''">#{applyUser},</if>
+ <if test="number != null ">#{number},</if>
+ <if test="unit != null and unit != ''">#{unit},</if>
+ <if test="createDate != null ">#{createDate},</if>
+ <if test="remark != null and remark != ''">#{remark},</if>
+ </trim>
+ </insert>
+
+ <update id="updateTubLog" parameterType="TubLog">
+ update js_tub_log
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="code != null and code != ''">code = #{code},</if>
+ <if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
+ <if test="tubName != null and tubName != ''">tub_name = #{tubName},</if>
+ <if test="type != null and type != ''">type = #{type},</if>
+ <if test="outboundDate != null ">outbound_date = #{outboundDate},</if>
+ <if test="inboundDate != null ">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 ">number = #{number},</if>
+ <if test="unit != null and unit != ''">unit = #{unit},</if>
+ <if test="createDate != null ">create_date = #{createDate},</if>
+ <if test="remark != null and remark != ''">remark = #{remark},</if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <delete id="deleteTubLogById" parameterType="Integer">
+ delete from js_tub_log where id = #{id}
+ </delete>
+
+ <delete id="deleteTubLogByIds" parameterType="String">
+ delete from js_tub_log where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+
+</mapper>
\ No newline at end of file
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/TubLog.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/TubLog.html
new file mode 100644
index 0000000..ace4a6f
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/TubLog.html
@@ -0,0 +1,134 @@
+<!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>
+ <p>绠℃潗鍚嶇О锛�</p>
+ <input type="text" name="tubName"/>
+ </li>
+ <li>
+ <p>缁忓姙浜猴細</p>
+ <input type="text" name="optUser"/>
+ </li>
+ <li>
+ <p>璐熻矗浜猴細</p>
+ <input type="text" name="applyUser"/>
+ </li>
+ <li>
+ <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 鎼滅储</a>
+ <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 閲嶇疆</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="geo:TubLog:add">
+ <i class="fa fa-plus"></i> 娣诲姞
+ </a>
+ <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="geo:TubLog:edit">
+ <i class="fa fa-edit"></i> 淇敼
+ </a>
+ <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:TubLog:remove">
+ <i class="fa fa-remove"></i> 鍒犻櫎
+ </a>
+ <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:TubLog: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>
+ <th:block th:include="include :: footer" />
+ <script th:inline="javascript">
+ var editFlag = [[${@permission.hasPermi('geo:TubLog:edit')}]];
+ var removeFlag = [[${@permission.hasPermi('geo:TubLog:remove')}]];
+ var prefix = ctx + "geo/TubLog";
+
+ $(function() {
+ var options = {
+ url: prefix + "/list",
+ createUrl: prefix + "/add",
+ updateUrl: prefix + "/edit/{id}",
+ removeUrl: prefix + "/remove",
+ exportUrl: prefix + "/export",
+ modalName: "鏉愭枡鍑哄叆搴撹褰�",
+ columns: [{
+ checkbox: true
+ },
+ {
+ field : 'id',
+ title : '涓婚敭',
+ visible: false
+ },
+ {
+ field : 'code',
+ title : '鍑哄叆搴撳崟瀛愬彿'
+ },
+ {
+ field : 'tubName',
+ title : '绠℃潗鍚嶇О'
+ },
+ {
+ field : 'type',
+ title : '绫诲瀷'
+ },
+ {
+ field : 'outboundDate',
+ title : '鍑哄簱鏃堕棿'
+ },
+ {
+ field : 'inboundDate',
+ title : '鍏ュ簱鏃堕棿'
+ },
+ {
+ field : 'optUser',
+ title : '缁忓姙浜�'
+ },
+ {
+ field : 'applyUser',
+ title : '璐熻矗浜�'
+ },
+ {
+ field : 'number',
+ title : '鍑哄叆搴撴暟閲�'
+ },
+ {
+ field : 'unit',
+ title : '鏁版嵁鍗曚綅'
+ },
+ {
+ field : 'createDate',
+ title : '鏃堕棿'
+ },
+ {
+ field : 'remark',
+ 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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>鍒犻櫎</a>');
+ return actions.join('');
+ }
+ }]
+ };
+ $.table.init(options);
+ });
+ </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/add.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/add.html
new file mode 100644
index 0000000..10d7fcb
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/add.html
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+ <th:block th:include="include :: header('鏂板鏉愭枡鍑哄叆搴撹褰�')" />
+ <th:block th:include="include :: datetimepicker-css" />
+</head>
+<body class="white-bg">
+ <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+ <form class="form-horizontal m" id="form-TubLog-add">
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍑哄叆搴撳崟瀛愬彿锛�</label>
+ <div class="col-sm-8">
+ <input name="code" 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="tubName" 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="type" class="form-control m-b">
+ <option value="">鎵�鏈�</option>
+ </select>
+ <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 浠g爜鐢熸垚璇烽�夋嫨瀛楀吀灞炴��</span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍑哄簱鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="outboundDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍏ュ簱鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="inboundDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">缁忓姙浜猴細</label>
+ <div class="col-sm-8">
+ <input name="optUser" 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="applyUser" 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="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">
+ <input name="unit" class="form-control" type="text">
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="createDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ <th:block th:include="include :: footer" />
+ <th:block th:include="include :: datetimepicker-js" />
+ <script type="text/javascript">
+ var prefix = ctx + "geo/TubLog"
+ $("#form-TubLog-add").validate({
+ focusCleanup: true
+ });
+
+ function submitHandler() {
+ if ($.validate.form()) {
+ $.operate.save(prefix + "/add", $('#form-TubLog-add').serialize());
+ }
+ }
+
+ $("input[name='outboundDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("input[name='inboundDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("input[name='createDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+ </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html
new file mode 100644
index 0000000..837a610
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+ <th:block th:include="include :: header('淇敼鏉愭枡鍑哄叆搴撹褰�')" />
+ <th:block th:include="include :: datetimepicker-css" />
+</head>
+<body class="white-bg">
+ <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+ <form class="form-horizontal m" id="form-TubLog-edit" th:object="${tubLog}">
+ <input name="id" th:field="*{id}" type="hidden">
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍑哄叆搴撳崟瀛愬彿锛�</label>
+ <div class="col-sm-8">
+ <input name="code" th:field="*{code}" 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="tubName" th:field="*{tubName}" 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="type" class="form-control m-b">
+ <option value="">鎵�鏈�</option>
+ </select>
+ <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 浠g爜鐢熸垚璇烽�夋嫨瀛楀吀灞炴��</span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍑哄簱鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="outboundDate" th:value="${#dates.format(tubLog.outboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍏ュ簱鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="inboundDate" th:value="${#dates.format(tubLog.inboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">缁忓姙浜猴細</label>
+ <div class="col-sm-8">
+ <input name="optUser" th:field="*{optUser}" 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="applyUser" th:field="*{applyUser}" 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="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">
+ <input name="unit" th:field="*{unit}" class="form-control" type="text">
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="createDate" th:value="${#dates.format(tubLog.createDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ <th:block th:include="include :: footer" />
+ <th:block th:include="include :: datetimepicker-js" />
+ <script type="text/javascript">
+ var prefix = ctx + "geo/TubLog";
+ $("#form-TubLog-edit").validate({
+ focusCleanup: true
+ });
+
+ function submitHandler() {
+ if ($.validate.form()) {
+ $.operate.save(prefix + "/edit", $('#form-TubLog-edit').serialize());
+ }
+ }
+
+ $("input[name='outboundDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("input[name='inboundDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("input[name='createDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+ </script>
+</body>
+</html>
\ No newline at end of file
--
Gitblit v1.9.1