正在显示
10 个修改的文件
包含
515 行增加
和
7 行删除
| @@ -32,12 +32,12 @@ spring: | @@ -32,12 +32,12 @@ spring: | ||
| 32 | #eureka主机名,会在控制页面中显示 | 32 | #eureka主机名,会在控制页面中显示 |
| 33 | #DEV环境关闭注册。 | 33 | #DEV环境关闭注册。 |
| 34 | features: | 34 | features: |
| 35 | - enabled: false | 35 | + enabled: true |
| 36 | discovery: | 36 | discovery: |
| 37 | - enabled: false | 37 | + enabled: true |
| 38 | service-registry: | 38 | service-registry: |
| 39 | auto-registration: | 39 | auto-registration: |
| 40 | - enabled: false | 40 | + enabled: true |
| 41 | 41 | ||
| 42 | datasource: | 42 | datasource: |
| 43 | type: com.alibaba.druid.pool.DruidDataSource | 43 | type: com.alibaba.druid.pool.DruidDataSource |
| @@ -85,7 +85,7 @@ eureka: | @@ -85,7 +85,7 @@ eureka: | ||
| 85 | client: | 85 | client: |
| 86 | #eureka注册中心服务器地址 | 86 | #eureka注册中心服务器地址 |
| 87 | service-url: | 87 | service-url: |
| 88 | - defaultZone: http://10.50.3.82:19527/eureka/ | 88 | + defaultZone: http://192.168.1.53:12345/eureka/ |
| 89 | registry-fetch-interval-seconds: 30 | 89 | registry-fetch-interval-seconds: 30 |
| 90 | lease-renewal-interval-in-seconds: 15 | 90 | lease-renewal-interval-in-seconds: 15 |
| 91 | lease-expiration-duration-in-seconds: 45 | 91 | lease-expiration-duration-in-seconds: 45 |
src/main/java/com/tianbo/warehouse/controller/staff/StaffSecurityInspectionController.java
0 → 100644
| 1 | +package com.tianbo.warehouse.controller.staff; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.github.pagehelper.PageInfo; | ||
| 5 | +import com.tianbo.warehouse.annotation.LogAnnotation; | ||
| 6 | +import com.tianbo.warehouse.controller.response.ResultJson; | ||
| 7 | +import com.tianbo.warehouse.model.StaffSecurityInspection; | ||
| 8 | +import com.tianbo.warehouse.service.satff.StaffSecurityInspectionService; | ||
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | +import org.springframework.web.bind.annotation.*; | ||
| 11 | + | ||
| 12 | +import javax.servlet.http.HttpServletRequest; | ||
| 13 | +import javax.servlet.http.HttpServletResponse; | ||
| 14 | +import javax.validation.Valid; | ||
| 15 | + | ||
| 16 | +@RestController | ||
| 17 | +@RequestMapping("/stall") | ||
| 18 | +public class StaffSecurityInspectionController { | ||
| 19 | + | ||
| 20 | + @Autowired | ||
| 21 | + StaffSecurityInspectionService staffSecurityInspectionService; | ||
| 22 | + | ||
| 23 | + @GetMapping("/list") | ||
| 24 | + public PageInfo<StaffSecurityInspection> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1") | ||
| 25 | + int pageNum, | ||
| 26 | + @RequestParam(value = "pageSize",required = false,defaultValue = "5") | ||
| 27 | + int pageSize){ | ||
| 28 | + return staffSecurityInspectionService.findAll(pageNum,pageSize); | ||
| 29 | + | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @LogAnnotation(moduleName = "职工公寓安全巡视管理",operate = "职工公寓安全巡视添加") | ||
| 33 | + @PostMapping("/add") | ||
| 34 | + public ResultJson add(@RequestBody StaffSecurityInspection staffSecurityInspection){ | ||
| 35 | + | ||
| 36 | + int i =staffSecurityInspectionService.insertSelective(staffSecurityInspection); | ||
| 37 | + | ||
| 38 | + ResultJson resultJson = new ResultJson(); | ||
| 39 | + if (1==i){ | ||
| 40 | + resultJson = new ResultJson("200","添加成功"); | ||
| 41 | + }else { | ||
| 42 | + resultJson = new ResultJson("500","insert faild"); | ||
| 43 | + } | ||
| 44 | + return resultJson; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + @LogAnnotation(moduleName = "职工公寓安全巡视管理",operate = "职工公寓安全巡视修改") | ||
| 48 | + @PutMapping("/edit") | ||
| 49 | + @ResponseBody | ||
| 50 | + public ResultJson edit(@RequestBody @Valid StaffSecurityInspection staffSecurityInspection){ | ||
| 51 | + | ||
| 52 | + int i =staffSecurityInspectionService.updateByPrimaryKeySelective(staffSecurityInspection); | ||
| 53 | + | ||
| 54 | + ResultJson resultJson = new ResultJson(); | ||
| 55 | + if (1==i){ | ||
| 56 | + resultJson = new ResultJson("200","修改成功"); | ||
| 57 | + }else { | ||
| 58 | + resultJson = new ResultJson("500","insert faild"); | ||
| 59 | + } | ||
| 60 | + return resultJson; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + @LogAnnotation(moduleName = "职工公寓安全巡视管理",operate = "职工公寓安全巡视删除") | ||
| 64 | + @DeleteMapping("/del") | ||
| 65 | + public ResultJson reomve(@RequestBody StaffSecurityInspection staffSecurityInspection, HttpServletRequest request, HttpServletResponse response){ | ||
| 66 | + | ||
| 67 | + int i =staffSecurityInspectionService.deleteByPrimaryKey(staffSecurityInspection.getSecurityInspectionId()); | ||
| 68 | + | ||
| 69 | + ResultJson resultJson = new ResultJson(); | ||
| 70 | + if (1==i){ | ||
| 71 | + resultJson = new ResultJson("200","删除成功"); | ||
| 72 | + }else { | ||
| 73 | + resultJson = new ResultJson("500","insert faild"); | ||
| 74 | + } | ||
| 75 | + return resultJson; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + @LogAnnotation(moduleName = "职工公寓安全巡视管理",operate = "职工公寓安全巡视删除") | ||
| 79 | + @GetMapping("/batchremove") | ||
| 80 | + public ResultJson reomve(String ids, HttpServletRequest request, HttpServletResponse response){ | ||
| 81 | + | ||
| 82 | + ResultJson resultJson = new ResultJson(); | ||
| 83 | + | ||
| 84 | + if (staffSecurityInspectionService.deleteByPrimaryKey(ids)>0){ | ||
| 85 | + resultJson = new ResultJson("200","删除成功"); | ||
| 86 | + }else { | ||
| 87 | + resultJson = new ResultJson("500","insert faild"); | ||
| 88 | + } | ||
| 89 | + return resultJson; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | +} |
| 1 | +package com.tianbo.warehouse.dao; | ||
| 2 | + | ||
| 3 | +import com.tianbo.warehouse.model.StaffSecurityInspection; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +public interface StaffSecurityInspectionMapper { | ||
| 8 | + int deleteByPrimaryKey(String securityInspectionId); | ||
| 9 | + | ||
| 10 | + int insert(StaffSecurityInspection record); | ||
| 11 | + | ||
| 12 | + int insertSelective(StaffSecurityInspection record); | ||
| 13 | + | ||
| 14 | + StaffSecurityInspection selectByPrimaryKey(String securityInspectionId); | ||
| 15 | + | ||
| 16 | + int updateByPrimaryKeySelective(StaffSecurityInspection record); | ||
| 17 | + | ||
| 18 | + int updateByPrimaryKey(StaffSecurityInspection record); | ||
| 19 | + | ||
| 20 | + List<StaffSecurityInspection> findAll(); | ||
| 21 | +} |
| 1 | +package com.tianbo.warehouse.model; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | + | ||
| 5 | +public class StaffSecurityInspection { | ||
| 6 | + private String securityInspectionId; | ||
| 7 | + | ||
| 8 | + private String securityInspectionName; | ||
| 9 | + | ||
| 10 | + private Date securityInspectionDate; | ||
| 11 | + | ||
| 12 | + private String fireName; | ||
| 13 | + | ||
| 14 | + private String securityElectro; | ||
| 15 | + | ||
| 16 | + private String fireproofing; | ||
| 17 | + | ||
| 18 | + private String doubtfulPerson; | ||
| 19 | + | ||
| 20 | + private String violationsCar; | ||
| 21 | + | ||
| 22 | + private String builders; | ||
| 23 | + | ||
| 24 | + private Integer userId; | ||
| 25 | + | ||
| 26 | + private String realname; | ||
| 27 | + | ||
| 28 | + private Date optTime; | ||
| 29 | + | ||
| 30 | + public String getSecurityInspectionId() { | ||
| 31 | + return securityInspectionId; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setSecurityInspectionId(String securityInspectionId) { | ||
| 35 | + this.securityInspectionId = securityInspectionId == null ? null : securityInspectionId.trim(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public String getSecurityInspectionName() { | ||
| 39 | + return securityInspectionName; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setSecurityInspectionName(String securityInspectionName) { | ||
| 43 | + this.securityInspectionName = securityInspectionName == null ? null : securityInspectionName.trim(); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public Date getSecurityInspectionDate() { | ||
| 47 | + return securityInspectionDate; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setSecurityInspectionDate(Date securityInspectionDate) { | ||
| 51 | + this.securityInspectionDate = securityInspectionDate; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public String getFireName() { | ||
| 55 | + return fireName; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setFireName(String fireName) { | ||
| 59 | + this.fireName = fireName == null ? null : fireName.trim(); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public String getSecurityElectro() { | ||
| 63 | + return securityElectro; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setSecurityElectro(String securityElectro) { | ||
| 67 | + this.securityElectro = securityElectro == null ? null : securityElectro.trim(); | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public String getFireproofing() { | ||
| 71 | + return fireproofing; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public void setFireproofing(String fireproofing) { | ||
| 75 | + this.fireproofing = fireproofing == null ? null : fireproofing.trim(); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + public String getDoubtfulPerson() { | ||
| 79 | + return doubtfulPerson; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public void setDoubtfulPerson(String doubtfulPerson) { | ||
| 83 | + this.doubtfulPerson = doubtfulPerson == null ? null : doubtfulPerson.trim(); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public String getViolationsCar() { | ||
| 87 | + return violationsCar; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public void setViolationsCar(String violationsCar) { | ||
| 91 | + this.violationsCar = violationsCar == null ? null : violationsCar.trim(); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + public String getBuilders() { | ||
| 95 | + return builders; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public void setBuilders(String builders) { | ||
| 99 | + this.builders = builders == null ? null : builders.trim(); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public Integer getUserId() { | ||
| 103 | + return userId; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public void setUserId(Integer userId) { | ||
| 107 | + this.userId = userId; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public String getRealname() { | ||
| 111 | + return realname; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public void setRealname(String realname) { | ||
| 115 | + this.realname = realname == null ? null : realname.trim(); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public Date getOptTime() { | ||
| 119 | + return optTime; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public void setOptTime(Date optTime) { | ||
| 123 | + this.optTime = optTime; | ||
| 124 | + } | ||
| 125 | +} |
src/main/java/com/tianbo/warehouse/service/satff/Imp/StaffSecurityInspectionServiceImp.java
0 → 100644
| 1 | +package com.tianbo.warehouse.service.satff.Imp; | ||
| 2 | + | ||
| 3 | +import com.github.pagehelper.Page; | ||
| 4 | +import com.github.pagehelper.PageHelper; | ||
| 5 | +import com.github.pagehelper.PageInfo; | ||
| 6 | +import com.tianbo.warehouse.dao.CompanyMapper; | ||
| 7 | +import com.tianbo.warehouse.dao.Group_companyMapper; | ||
| 8 | +import com.tianbo.warehouse.dao.StaffSecurityInspectionMapper; | ||
| 9 | +import com.tianbo.warehouse.model.Company; | ||
| 10 | +import com.tianbo.warehouse.model.Group_company; | ||
| 11 | +import com.tianbo.warehouse.model.StaffSecurityInspection; | ||
| 12 | +import com.tianbo.warehouse.service.CompanyService; | ||
| 13 | +import com.tianbo.warehouse.service.satff.StaffSecurityInspectionService; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.stereotype.Service; | ||
| 16 | + | ||
| 17 | +import java.util.Date; | ||
| 18 | +import java.util.List; | ||
| 19 | +import java.util.UUID; | ||
| 20 | + | ||
| 21 | +@Service | ||
| 22 | +public class StaffSecurityInspectionServiceImp implements StaffSecurityInspectionService { | ||
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + StaffSecurityInspectionMapper staffSecurityInspectionMapper; | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + public PageInfo<StaffSecurityInspection> findAll(int pageNum, int pageSize) { | ||
| 29 | + Page<StaffSecurityInspection> page = PageHelper.startPage(pageNum,pageSize); | ||
| 30 | + List<StaffSecurityInspection> list = staffSecurityInspectionMapper.findAll(); | ||
| 31 | + | ||
| 32 | + PageInfo<StaffSecurityInspection> result = new PageInfo<>(list); | ||
| 33 | + return result; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public int insertSelective(StaffSecurityInspection staffSecurityInspection) { | ||
| 38 | + staffSecurityInspection.setSecurityInspectionId(UUID.randomUUID().toString()); | ||
| 39 | + staffSecurityInspection.setOptTime(new Date()); | ||
| 40 | + return staffSecurityInspectionMapper.insertSelective(staffSecurityInspection); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + @Override | ||
| 44 | + public int updateByPrimaryKeySelective(StaffSecurityInspection staffSecurityInspection) { | ||
| 45 | + staffSecurityInspection.setOptTime(new Date()); | ||
| 46 | + return staffSecurityInspectionMapper.updateByPrimaryKeySelective(staffSecurityInspection); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + @Override | ||
| 50 | + public int deleteByPrimaryKey(String securityInspectionId) { | ||
| 51 | + if (securityInspectionId.contains(",")){ | ||
| 52 | + try { | ||
| 53 | + String a = ""; | ||
| 54 | + String[] split = securityInspectionId.split(","); | ||
| 55 | + for (int i=0; i<split.length; i++){ | ||
| 56 | + staffSecurityInspectionMapper.deleteByPrimaryKey(split[i]); | ||
| 57 | + } | ||
| 58 | + return 1; | ||
| 59 | + }catch (Exception e){ | ||
| 60 | + e.printStackTrace(); | ||
| 61 | + return 0; | ||
| 62 | + } | ||
| 63 | + }else { | ||
| 64 | + return staffSecurityInspectionMapper.deleteByPrimaryKey(securityInspectionId); | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | +} |
| 1 | +package com.tianbo.warehouse.service.satff; | ||
| 2 | + | ||
| 3 | +import com.github.pagehelper.PageInfo; | ||
| 4 | +import com.tianbo.warehouse.model.Company; | ||
| 5 | +import com.tianbo.warehouse.model.StaffSecurityInspection; | ||
| 6 | + | ||
| 7 | +public interface StaffSecurityInspectionService { | ||
| 8 | + | ||
| 9 | + PageInfo<StaffSecurityInspection> findAll(int pageNum, int pageSize); | ||
| 10 | + | ||
| 11 | + int insertSelective(StaffSecurityInspection staffSecurityInspection); | ||
| 12 | + | ||
| 13 | + int updateByPrimaryKeySelective(StaffSecurityInspection company); | ||
| 14 | + | ||
| 15 | + int deleteByPrimaryKey(String securityInspectionId); | ||
| 16 | + | ||
| 17 | +} |
| @@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
| 22 | select | 22 | select |
| 23 | <include refid="Base_Column_List" /> | 23 | <include refid="Base_Column_List" /> |
| 24 | from company | 24 | from company |
| 25 | - <if test="companyName != ''"> | 25 | + <if test="companyName != '' companyName != null"> |
| 26 | where company_name = #{companyName,jdbcType=VARCHAR} | 26 | where company_name = #{companyName,jdbcType=VARCHAR} |
| 27 | </if> | 27 | </if> |
| 28 | ORDER BY company_id | 28 | ORDER BY company_id |
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | select | 21 | select |
| 22 | <include refid="Base_Column_List" /> | 22 | <include refid="Base_Column_List" /> |
| 23 | from department | 23 | from department |
| 24 | - <if test="departmentName != ''" > | 24 | + <if test="departmentName != '' and departmentName != null" > |
| 25 | where department_name = #{departmentName, jdbcType=VARCHAR} | 25 | where department_name = #{departmentName, jdbcType=VARCHAR} |
| 26 | </if> | 26 | </if> |
| 27 | ORDER BY department_id | 27 | ORDER BY department_id |
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | select | 29 | select |
| 30 | <include refid="Base_Column_List" /> | 30 | <include refid="Base_Column_List" /> |
| 31 | from permission | 31 | from permission |
| 32 | - <if test="name != ''" > | 32 | + <if test="name != '' and name !=null" > |
| 33 | where name = #{name, jdbcType=VARCHAR} | 33 | where name = #{name, jdbcType=VARCHAR} |
| 34 | </if> | 34 | </if> |
| 35 | ORDER BY permission_order | 35 | ORDER BY permission_order |
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
| 3 | +<mapper namespace="com.tianbo.warehouse.dao.StaffSecurityInspectionMapper" > | ||
| 4 | + <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.StaffSecurityInspection" > | ||
| 5 | + <id column="security_inspection_id" property="securityInspectionId" jdbcType="VARCHAR" /> | ||
| 6 | + <result column="security_inspection_name" property="securityInspectionName" jdbcType="VARCHAR" /> | ||
| 7 | + <result column="security_inspection_date" property="securityInspectionDate" jdbcType="TIMESTAMP" /> | ||
| 8 | + <result column="fire_name" property="fireName" jdbcType="VARCHAR" /> | ||
| 9 | + <result column="security_electro" property="securityElectro" jdbcType="VARCHAR" /> | ||
| 10 | + <result column="fireproofing" property="fireproofing" jdbcType="VARCHAR" /> | ||
| 11 | + <result column="doubtful_person" property="doubtfulPerson" jdbcType="VARCHAR" /> | ||
| 12 | + <result column="violations_car" property="violationsCar" jdbcType="VARCHAR" /> | ||
| 13 | + <result column="builders" property="builders" jdbcType="VARCHAR" /> | ||
| 14 | + <result column="user_id" property="userId" jdbcType="INTEGER" /> | ||
| 15 | + <result column="realname" property="realname" jdbcType="VARCHAR" /> | ||
| 16 | + <result column="opt_time" property="optTime" jdbcType="TIMESTAMP" /> | ||
| 17 | + </resultMap> | ||
| 18 | + <sql id="Base_Column_List" > | ||
| 19 | + security_inspection_id, security_inspection_name, security_inspection_date, fire_name, | ||
| 20 | + security_electro, fireproofing, doubtful_person, violations_car, builders, user_id, | ||
| 21 | + realname, opt_time | ||
| 22 | + </sql> | ||
| 23 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
| 24 | + select | ||
| 25 | + <include refid="Base_Column_List" /> | ||
| 26 | + from staff_security_inspection | ||
| 27 | + where security_inspection_id = #{securityInspectionId,jdbcType=VARCHAR} | ||
| 28 | + </select> | ||
| 29 | + | ||
| 30 | + <select id="findAll" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
| 31 | + select | ||
| 32 | + <include refid="Base_Column_List" /> | ||
| 33 | + from staff_security_inspection | ||
| 34 | + ORDER BY opt_time | ||
| 35 | + </select> | ||
| 36 | + | ||
| 37 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > | ||
| 38 | + delete from staff_security_inspection | ||
| 39 | + where security_inspection_id = #{securityInspectionId,jdbcType=VARCHAR} | ||
| 40 | + </delete> | ||
| 41 | + <insert id="insert" parameterType="com.tianbo.warehouse.model.StaffSecurityInspection" > | ||
| 42 | + insert into staff_security_inspection (security_inspection_id, security_inspection_name, | ||
| 43 | + security_inspection_date, fire_name, security_electro, | ||
| 44 | + fireproofing, doubtful_person, violations_car, | ||
| 45 | + builders, user_id, realname, | ||
| 46 | + opt_time) | ||
| 47 | + values (#{securityInspectionId,jdbcType=VARCHAR}, #{securityInspectionName,jdbcType=VARCHAR}, | ||
| 48 | + #{securityInspectionDate,jdbcType=TIMESTAMP}, #{fireName,jdbcType=VARCHAR}, #{securityElectro,jdbcType=VARCHAR}, | ||
| 49 | + #{fireproofing,jdbcType=VARCHAR}, #{doubtfulPerson,jdbcType=VARCHAR}, #{violationsCar,jdbcType=VARCHAR}, | ||
| 50 | + #{builders,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{realname,jdbcType=VARCHAR}, | ||
| 51 | + #{optTime,jdbcType=TIMESTAMP}) | ||
| 52 | + </insert> | ||
| 53 | + <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffSecurityInspection" > | ||
| 54 | + insert into staff_security_inspection | ||
| 55 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
| 56 | + <if test="securityInspectionId != null" > | ||
| 57 | + security_inspection_id, | ||
| 58 | + </if> | ||
| 59 | + <if test="securityInspectionName != null" > | ||
| 60 | + security_inspection_name, | ||
| 61 | + </if> | ||
| 62 | + <if test="securityInspectionDate != null" > | ||
| 63 | + security_inspection_date, | ||
| 64 | + </if> | ||
| 65 | + <if test="fireName != null" > | ||
| 66 | + fire_name, | ||
| 67 | + </if> | ||
| 68 | + <if test="securityElectro != null" > | ||
| 69 | + security_electro, | ||
| 70 | + </if> | ||
| 71 | + <if test="fireproofing != null" > | ||
| 72 | + fireproofing, | ||
| 73 | + </if> | ||
| 74 | + <if test="doubtfulPerson != null" > | ||
| 75 | + doubtful_person, | ||
| 76 | + </if> | ||
| 77 | + <if test="violationsCar != null" > | ||
| 78 | + violations_car, | ||
| 79 | + </if> | ||
| 80 | + <if test="builders != null" > | ||
| 81 | + builders, | ||
| 82 | + </if> | ||
| 83 | + <if test="userId != null" > | ||
| 84 | + user_id, | ||
| 85 | + </if> | ||
| 86 | + <if test="realname != null" > | ||
| 87 | + realname, | ||
| 88 | + </if> | ||
| 89 | + <if test="optTime != null" > | ||
| 90 | + opt_time, | ||
| 91 | + </if> | ||
| 92 | + </trim> | ||
| 93 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
| 94 | + <if test="securityInspectionId != null" > | ||
| 95 | + #{securityInspectionId,jdbcType=VARCHAR}, | ||
| 96 | + </if> | ||
| 97 | + <if test="securityInspectionName != null" > | ||
| 98 | + #{securityInspectionName,jdbcType=VARCHAR}, | ||
| 99 | + </if> | ||
| 100 | + <if test="securityInspectionDate != null" > | ||
| 101 | + #{securityInspectionDate,jdbcType=TIMESTAMP}, | ||
| 102 | + </if> | ||
| 103 | + <if test="fireName != null" > | ||
| 104 | + #{fireName,jdbcType=VARCHAR}, | ||
| 105 | + </if> | ||
| 106 | + <if test="securityElectro != null" > | ||
| 107 | + #{securityElectro,jdbcType=VARCHAR}, | ||
| 108 | + </if> | ||
| 109 | + <if test="fireproofing != null" > | ||
| 110 | + #{fireproofing,jdbcType=VARCHAR}, | ||
| 111 | + </if> | ||
| 112 | + <if test="doubtfulPerson != null" > | ||
| 113 | + #{doubtfulPerson,jdbcType=VARCHAR}, | ||
| 114 | + </if> | ||
| 115 | + <if test="violationsCar != null" > | ||
| 116 | + #{violationsCar,jdbcType=VARCHAR}, | ||
| 117 | + </if> | ||
| 118 | + <if test="builders != null" > | ||
| 119 | + #{builders,jdbcType=VARCHAR}, | ||
| 120 | + </if> | ||
| 121 | + <if test="userId != null" > | ||
| 122 | + #{userId,jdbcType=INTEGER}, | ||
| 123 | + </if> | ||
| 124 | + <if test="realname != null" > | ||
| 125 | + #{realname,jdbcType=VARCHAR}, | ||
| 126 | + </if> | ||
| 127 | + <if test="optTime != null" > | ||
| 128 | + #{optTime,jdbcType=TIMESTAMP}, | ||
| 129 | + </if> | ||
| 130 | + </trim> | ||
| 131 | + </insert> | ||
| 132 | + <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.StaffSecurityInspection" > | ||
| 133 | + update staff_security_inspection | ||
| 134 | + <set > | ||
| 135 | + <if test="securityInspectionName != null" > | ||
| 136 | + security_inspection_name = #{securityInspectionName,jdbcType=VARCHAR}, | ||
| 137 | + </if> | ||
| 138 | + <if test="securityInspectionDate != null" > | ||
| 139 | + security_inspection_date = #{securityInspectionDate,jdbcType=TIMESTAMP}, | ||
| 140 | + </if> | ||
| 141 | + <if test="fireName != null" > | ||
| 142 | + fire_name = #{fireName,jdbcType=VARCHAR}, | ||
| 143 | + </if> | ||
| 144 | + <if test="securityElectro != null" > | ||
| 145 | + security_electro = #{securityElectro,jdbcType=VARCHAR}, | ||
| 146 | + </if> | ||
| 147 | + <if test="fireproofing != null" > | ||
| 148 | + fireproofing = #{fireproofing,jdbcType=VARCHAR}, | ||
| 149 | + </if> | ||
| 150 | + <if test="doubtfulPerson != null" > | ||
| 151 | + doubtful_person = #{doubtfulPerson,jdbcType=VARCHAR}, | ||
| 152 | + </if> | ||
| 153 | + <if test="violationsCar != null" > | ||
| 154 | + violations_car = #{violationsCar,jdbcType=VARCHAR}, | ||
| 155 | + </if> | ||
| 156 | + <if test="builders != null" > | ||
| 157 | + builders = #{builders,jdbcType=VARCHAR}, | ||
| 158 | + </if> | ||
| 159 | + <if test="userId != null" > | ||
| 160 | + user_id = #{userId,jdbcType=INTEGER}, | ||
| 161 | + </if> | ||
| 162 | + <if test="realname != null" > | ||
| 163 | + realname = #{realname,jdbcType=VARCHAR}, | ||
| 164 | + </if> | ||
| 165 | + <if test="optTime != null" > | ||
| 166 | + opt_time = #{optTime,jdbcType=TIMESTAMP}, | ||
| 167 | + </if> | ||
| 168 | + </set> | ||
| 169 | + where security_inspection_id = #{securityInspectionId,jdbcType=VARCHAR} | ||
| 170 | + </update> | ||
| 171 | + <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.StaffSecurityInspection" > | ||
| 172 | + update staff_security_inspection | ||
| 173 | + set security_inspection_name = #{securityInspectionName,jdbcType=VARCHAR}, | ||
| 174 | + security_inspection_date = #{securityInspectionDate,jdbcType=TIMESTAMP}, | ||
| 175 | + fire_name = #{fireName,jdbcType=VARCHAR}, | ||
| 176 | + security_electro = #{securityElectro,jdbcType=VARCHAR}, | ||
| 177 | + fireproofing = #{fireproofing,jdbcType=VARCHAR}, | ||
| 178 | + doubtful_person = #{doubtfulPerson,jdbcType=VARCHAR}, | ||
| 179 | + violations_car = #{violationsCar,jdbcType=VARCHAR}, | ||
| 180 | + builders = #{builders,jdbcType=VARCHAR}, | ||
| 181 | + user_id = #{userId,jdbcType=INTEGER}, | ||
| 182 | + realname = #{realname,jdbcType=VARCHAR}, | ||
| 183 | + opt_time = #{optTime,jdbcType=TIMESTAMP} | ||
| 184 | + where security_inspection_id = #{securityInspectionId,jdbcType=VARCHAR} | ||
| 185 | + </update> | ||
| 186 | +</mapper> |
-
请 注册 或 登录 后发表评论