职工公寓来访人员,车辆 值班巡视 增删改查 permission 布尔类型 实体 重写set方法
正在显示
13 个修改的文件
包含
1216 行增加
和
2 行删除
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.StaffApartmentComeCar; | ||
8 | +import com.tianbo.warehouse.model.StaffApartmentMaintain; | ||
9 | +import com.tianbo.warehouse.service.satff.ComeCarService; | ||
10 | +import com.tianbo.warehouse.service.satff.MaintainService; | ||
11 | +import org.springframework.beans.factory.annotation.Autowired; | ||
12 | +import org.springframework.web.bind.annotation.*; | ||
13 | + | ||
14 | +import javax.servlet.http.HttpServletRequest; | ||
15 | +import javax.servlet.http.HttpServletResponse; | ||
16 | +import javax.validation.Valid; | ||
17 | + | ||
18 | +@RestController | ||
19 | +@RequestMapping("/come_car") | ||
20 | +public class ComeCarController { | ||
21 | + | ||
22 | + @Autowired | ||
23 | + ComeCarService comeCarService; | ||
24 | + | ||
25 | + @GetMapping("/list") | ||
26 | + public PageInfo<StaffApartmentComeCar> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1") | ||
27 | + int pageNum, | ||
28 | + @RequestParam(value = "pageSize",required = false,defaultValue = "5") | ||
29 | + int pageSize, | ||
30 | + @RequestParam(value = "cometovisitname", required = false) | ||
31 | + String comeToVisitName){ | ||
32 | + return comeCarService.findAll(pageNum,pageSize,comeToVisitName); | ||
33 | + | ||
34 | + } | ||
35 | + | ||
36 | + @LogAnnotation(moduleName = "职工公寓人员,车辆来访登记",operate = "职工公寓人员,车辆来访登记添加") | ||
37 | + @PostMapping("/add") | ||
38 | + public ResultJson add(@RequestBody StaffApartmentComeCar staffApartmentComeCar){ | ||
39 | + | ||
40 | + int i =comeCarService.insertSelective(staffApartmentComeCar); | ||
41 | + | ||
42 | + ResultJson resultJson = new ResultJson(); | ||
43 | + if (1==i){ | ||
44 | + resultJson = new ResultJson("200","添加成功"); | ||
45 | + }else { | ||
46 | + resultJson = new ResultJson("500","insert faild"); | ||
47 | + } | ||
48 | + return resultJson; | ||
49 | + } | ||
50 | + | ||
51 | + @LogAnnotation(moduleName = "职工公寓人员,车辆来访登记",operate = "职工公寓人员,车辆来访登记修改") | ||
52 | + @PutMapping("/edit") | ||
53 | + @ResponseBody | ||
54 | + public ResultJson edit(@RequestBody @Valid StaffApartmentComeCar staffApartmentComeCar){ | ||
55 | + | ||
56 | + int i =comeCarService.updateByPrimaryKeySelective(staffApartmentComeCar); | ||
57 | + | ||
58 | + ResultJson resultJson = new ResultJson(); | ||
59 | + if (1==i){ | ||
60 | + resultJson = new ResultJson("200","修改成功"); | ||
61 | + }else { | ||
62 | + resultJson = new ResultJson("500","insert faild"); | ||
63 | + } | ||
64 | + return resultJson; | ||
65 | + } | ||
66 | + | ||
67 | + @LogAnnotation(moduleName = "职工公寓人员,车辆来访登记",operate = "职工公寓人员,车辆来访登记删除") | ||
68 | + @DeleteMapping("/del") | ||
69 | + public ResultJson reomve(@RequestBody StaffApartmentComeCar staffApartmentComeCar, HttpServletRequest request, HttpServletResponse response){ | ||
70 | + | ||
71 | + int i =comeCarService.deleteByPrimaryKey(staffApartmentComeCar.getId()); | ||
72 | + | ||
73 | + ResultJson resultJson = new ResultJson(); | ||
74 | + if (1==i){ | ||
75 | + resultJson = new ResultJson("200","删除成功"); | ||
76 | + }else { | ||
77 | + resultJson = new ResultJson("500","insert faild"); | ||
78 | + } | ||
79 | + return resultJson; | ||
80 | + } | ||
81 | + | ||
82 | + @LogAnnotation(moduleName = "职工公寓人员,车辆来访登记",operate = "职工公寓人员,车辆来访登记删除") | ||
83 | + @GetMapping("/batchremove") | ||
84 | + public ResultJson reomve(String ids, HttpServletRequest request, HttpServletResponse response){ | ||
85 | + | ||
86 | + ResultJson resultJson = new ResultJson(); | ||
87 | + | ||
88 | + if (comeCarService.deleteByPrimaryKey(ids)>0){ | ||
89 | + resultJson = new ResultJson("200","删除成功"); | ||
90 | + }else { | ||
91 | + resultJson = new ResultJson("500","insert faild"); | ||
92 | + } | ||
93 | + return resultJson; | ||
94 | + } | ||
95 | + | ||
96 | +} |
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.StaffApartmentMaintain; | ||
8 | +import com.tianbo.warehouse.model.StaffApartmentOnduty; | ||
9 | +import com.tianbo.warehouse.service.satff.MaintainService; | ||
10 | +import com.tianbo.warehouse.service.satff.OnDutyService; | ||
11 | +import org.springframework.beans.factory.annotation.Autowired; | ||
12 | +import org.springframework.web.bind.annotation.*; | ||
13 | + | ||
14 | +import javax.servlet.http.HttpServletRequest; | ||
15 | +import javax.servlet.http.HttpServletResponse; | ||
16 | +import javax.validation.Valid; | ||
17 | + | ||
18 | +@RestController | ||
19 | +@RequestMapping("/on_duty") | ||
20 | +public class OnDutyController { | ||
21 | + | ||
22 | + @Autowired | ||
23 | + OnDutyService onDutyService; | ||
24 | + | ||
25 | + @GetMapping("/list") | ||
26 | + public PageInfo<StaffApartmentOnduty> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1") | ||
27 | + int pageNum, | ||
28 | + @RequestParam(value = "pageSize",required = false,defaultValue = "5") | ||
29 | + int pageSize, | ||
30 | + @RequestParam(value = "warchkeeper", required = false) | ||
31 | + String warchkeeper){ | ||
32 | + return onDutyService.findAll(pageNum,pageSize,warchkeeper); | ||
33 | + | ||
34 | + } | ||
35 | + | ||
36 | + @LogAnnotation(moduleName = "职工公寓值班巡视管理",operate = "职工公寓值班巡视添加") | ||
37 | + @PostMapping("/add") | ||
38 | + public ResultJson add(@RequestBody StaffApartmentOnduty staffApartmentOnduty){ | ||
39 | + | ||
40 | + int i =onDutyService.insertSelective(staffApartmentOnduty); | ||
41 | + | ||
42 | + ResultJson resultJson = new ResultJson(); | ||
43 | + if (1==i){ | ||
44 | + resultJson = new ResultJson("200","添加成功"); | ||
45 | + }else { | ||
46 | + resultJson = new ResultJson("500","insert faild"); | ||
47 | + } | ||
48 | + return resultJson; | ||
49 | + } | ||
50 | + | ||
51 | + @LogAnnotation(moduleName = "职工公寓值班巡视管理",operate = "职工公寓值班巡视修改") | ||
52 | + @PutMapping("/edit") | ||
53 | + @ResponseBody | ||
54 | + public ResultJson edit(@RequestBody @Valid StaffApartmentOnduty staffApartmentOnduty){ | ||
55 | + | ||
56 | + int i =onDutyService.updateByPrimaryKeySelective(staffApartmentOnduty); | ||
57 | + | ||
58 | + ResultJson resultJson = new ResultJson(); | ||
59 | + if (1==i){ | ||
60 | + resultJson = new ResultJson("200","修改成功"); | ||
61 | + }else { | ||
62 | + resultJson = new ResultJson("500","insert faild"); | ||
63 | + } | ||
64 | + return resultJson; | ||
65 | + } | ||
66 | + | ||
67 | + @LogAnnotation(moduleName = "职工公寓值班巡视管理",operate = "职工公寓值班巡视删除") | ||
68 | + @DeleteMapping("/del") | ||
69 | + public ResultJson reomve(@RequestBody StaffApartmentOnduty staffApartmentOnduty, HttpServletRequest request, HttpServletResponse response){ | ||
70 | + | ||
71 | + int i =onDutyService.deleteByPrimaryKey(staffApartmentOnduty.getId()); | ||
72 | + | ||
73 | + ResultJson resultJson = new ResultJson(); | ||
74 | + if (1==i){ | ||
75 | + resultJson = new ResultJson("200","删除成功"); | ||
76 | + }else { | ||
77 | + resultJson = new ResultJson("500","insert faild"); | ||
78 | + } | ||
79 | + return resultJson; | ||
80 | + } | ||
81 | + | ||
82 | + @LogAnnotation(moduleName = "职工公寓值班巡视管理",operate = "职工公寓值班巡视删除") | ||
83 | + @GetMapping("/batchremove") | ||
84 | + public ResultJson reomve(String ids, HttpServletRequest request, HttpServletResponse response){ | ||
85 | + | ||
86 | + ResultJson resultJson = new ResultJson(); | ||
87 | + | ||
88 | + if (onDutyService.deleteByPrimaryKey(ids)>0){ | ||
89 | + resultJson = new ResultJson("200","删除成功"); | ||
90 | + }else { | ||
91 | + resultJson = new ResultJson("500","insert faild"); | ||
92 | + } | ||
93 | + return resultJson; | ||
94 | + } | ||
95 | + | ||
96 | +} |
1 | +package com.tianbo.warehouse.dao; | ||
2 | + | ||
3 | +import com.tianbo.warehouse.model.StaffApartmentComeCar; | ||
4 | +import org.apache.ibatis.annotations.Param; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +public interface StaffApartmentComeCarMapper { | ||
9 | + int deleteByPrimaryKey(String id); | ||
10 | + | ||
11 | + int insert(StaffApartmentComeCar record); | ||
12 | + | ||
13 | + int insertSelective(StaffApartmentComeCar record); | ||
14 | + | ||
15 | + StaffApartmentComeCar selectByPrimaryKey(String id); | ||
16 | + | ||
17 | + int updateByPrimaryKeySelective(StaffApartmentComeCar record); | ||
18 | + | ||
19 | + int updateByPrimaryKey(StaffApartmentComeCar record); | ||
20 | + | ||
21 | + List<StaffApartmentComeCar> findAll(@Param("comeToVisitName") String comeToVisitName); | ||
22 | +} |
1 | +package com.tianbo.warehouse.dao; | ||
2 | + | ||
3 | +import com.tianbo.warehouse.model.StaffApartmentOnduty; | ||
4 | +import org.apache.ibatis.annotations.Param; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +public interface StaffApartmentOndutyMapper { | ||
9 | + int deleteByPrimaryKey(String id); | ||
10 | + | ||
11 | + int insert(StaffApartmentOnduty record); | ||
12 | + | ||
13 | + int insertSelective(StaffApartmentOnduty record); | ||
14 | + | ||
15 | + StaffApartmentOnduty selectByPrimaryKey(String id); | ||
16 | + | ||
17 | + int updateByPrimaryKeySelective(StaffApartmentOnduty record); | ||
18 | + | ||
19 | + int updateByPrimaryKey(StaffApartmentOnduty record); | ||
20 | + | ||
21 | + List<StaffApartmentOnduty> findAll(@Param("warchkeeper") String warchkeeper); | ||
22 | +} |
@@ -61,8 +61,8 @@ public class PERMISSION { | @@ -61,8 +61,8 @@ public class PERMISSION { | ||
61 | return ismenu; | 61 | return ismenu; |
62 | } | 62 | } |
63 | 63 | ||
64 | - public void setIsmenu(Boolean ismenu) { | ||
65 | - this.ismenu = ismenu; | 64 | + public void setIsmenu(String ismenu) { |
65 | + this.ismenu = "0".equals(ismenu)?false:true ; | ||
66 | } | 66 | } |
67 | 67 | ||
68 | public Integer getParentId() { | 68 | public Integer getParentId() { |
1 | +package com.tianbo.warehouse.model; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
4 | +import org.springframework.format.annotation.DateTimeFormat; | ||
5 | + | ||
6 | +import java.util.Date; | ||
7 | + | ||
8 | +public class StaffApartmentComeCar { | ||
9 | + private String id; | ||
10 | + | ||
11 | + @DateTimeFormat(pattern = "yyyy-MM-dd") | ||
12 | + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | ||
13 | + private Date datetime; | ||
14 | + | ||
15 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
16 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
17 | + private Date cometovisitdate; | ||
18 | + | ||
19 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
20 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
21 | + private Date leavedate; | ||
22 | + | ||
23 | + private String cometovisitname; | ||
24 | + | ||
25 | + private String carnumber; | ||
26 | + | ||
27 | + private String phone; | ||
28 | + | ||
29 | + private String comematter; | ||
30 | + | ||
31 | + private String warchkeeper; | ||
32 | + | ||
33 | + private String remark1; | ||
34 | + | ||
35 | + private String remark2; | ||
36 | + | ||
37 | + private String remark3; | ||
38 | + | ||
39 | + private Integer userid; | ||
40 | + | ||
41 | + private Date createtime; | ||
42 | + | ||
43 | + public String getId() { | ||
44 | + return id; | ||
45 | + } | ||
46 | + | ||
47 | + public void setId(String id) { | ||
48 | + this.id = id == null ? null : id.trim(); | ||
49 | + } | ||
50 | + | ||
51 | + public Date getDatetime() { | ||
52 | + return datetime; | ||
53 | + } | ||
54 | + | ||
55 | + public void setDatetime(Date datetime) { | ||
56 | + this.datetime = datetime; | ||
57 | + } | ||
58 | + | ||
59 | + public Date getCometovisitdate() { | ||
60 | + return cometovisitdate; | ||
61 | + } | ||
62 | + | ||
63 | + public void setCometovisitdate(Date cometovisitdate) { | ||
64 | + this.cometovisitdate = cometovisitdate; | ||
65 | + } | ||
66 | + | ||
67 | + public Date getLeavedate() { | ||
68 | + return leavedate; | ||
69 | + } | ||
70 | + | ||
71 | + public void setLeavedate(Date leavedate) { | ||
72 | + this.leavedate = leavedate; | ||
73 | + } | ||
74 | + | ||
75 | + public String getCometovisitname() { | ||
76 | + return cometovisitname; | ||
77 | + } | ||
78 | + | ||
79 | + public void setCometovisitname(String cometovisitname) { | ||
80 | + this.cometovisitname = cometovisitname == null ? null : cometovisitname.trim(); | ||
81 | + } | ||
82 | + | ||
83 | + public String getCarnumber() { | ||
84 | + return carnumber; | ||
85 | + } | ||
86 | + | ||
87 | + public void setCarnumber(String carnumber) { | ||
88 | + this.carnumber = carnumber == null ? null : carnumber.trim(); | ||
89 | + } | ||
90 | + | ||
91 | + public String getPhone() { | ||
92 | + return phone; | ||
93 | + } | ||
94 | + | ||
95 | + public void setPhone(String phone) { | ||
96 | + this.phone = phone == null ? null : phone.trim(); | ||
97 | + } | ||
98 | + | ||
99 | + public String getComematter() { | ||
100 | + return comematter; | ||
101 | + } | ||
102 | + | ||
103 | + public void setComematter(String comematter) { | ||
104 | + this.comematter = comematter == null ? null : comematter.trim(); | ||
105 | + } | ||
106 | + | ||
107 | + public String getWarchkeeper() { | ||
108 | + return warchkeeper; | ||
109 | + } | ||
110 | + | ||
111 | + public void setWarchkeeper(String warchkeeper) { | ||
112 | + this.warchkeeper = warchkeeper == null ? null : warchkeeper.trim(); | ||
113 | + } | ||
114 | + | ||
115 | + public String getRemark1() { | ||
116 | + return remark1; | ||
117 | + } | ||
118 | + | ||
119 | + public void setRemark1(String remark1) { | ||
120 | + this.remark1 = remark1 == null ? null : remark1.trim(); | ||
121 | + } | ||
122 | + | ||
123 | + public String getRemark2() { | ||
124 | + return remark2; | ||
125 | + } | ||
126 | + | ||
127 | + public void setRemark2(String remark2) { | ||
128 | + this.remark2 = remark2 == null ? null : remark2.trim(); | ||
129 | + } | ||
130 | + | ||
131 | + public String getRemark3() { | ||
132 | + return remark3; | ||
133 | + } | ||
134 | + | ||
135 | + public void setRemark3(String remark3) { | ||
136 | + this.remark3 = remark3 == null ? null : remark3.trim(); | ||
137 | + } | ||
138 | + | ||
139 | + public Integer getUserid() { | ||
140 | + return userid; | ||
141 | + } | ||
142 | + | ||
143 | + public void setUserid(Integer userid) { | ||
144 | + this.userid = userid; | ||
145 | + } | ||
146 | + | ||
147 | + public Date getCreatetime() { | ||
148 | + return createtime; | ||
149 | + } | ||
150 | + | ||
151 | + public void setCreatetime(Date createtime) { | ||
152 | + this.createtime = createtime; | ||
153 | + } | ||
154 | +} |
1 | +package com.tianbo.warehouse.model; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
4 | +import org.springframework.format.annotation.DateTimeFormat; | ||
5 | + | ||
6 | +import java.util.Date; | ||
7 | + | ||
8 | +public class StaffApartmentOnduty { | ||
9 | + private String id; | ||
10 | + | ||
11 | + private String warchkeeper; | ||
12 | + | ||
13 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
14 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
15 | + private Date handovershifttime; | ||
16 | + | ||
17 | + private String publiclighting; | ||
18 | + | ||
19 | + private String carpark; | ||
20 | + | ||
21 | + private String campusafforestation; | ||
22 | + | ||
23 | + private String firefightingequipment; | ||
24 | + | ||
25 | + private String equipmentfacilities; | ||
26 | + | ||
27 | + private String publicsanitation; | ||
28 | + | ||
29 | + private String property; | ||
30 | + | ||
31 | + private String securitydanger; | ||
32 | + | ||
33 | + private String rests; | ||
34 | + | ||
35 | + private String handovermatters; | ||
36 | + | ||
37 | + private Date creatime; | ||
38 | + | ||
39 | + private Integer userid; | ||
40 | + | ||
41 | + private String remberk1; | ||
42 | + | ||
43 | + private String remberk2; | ||
44 | + | ||
45 | + private String remberk3; | ||
46 | + | ||
47 | + public String getId() { | ||
48 | + return id; | ||
49 | + } | ||
50 | + | ||
51 | + public void setId(String id) { | ||
52 | + this.id = id == null ? null : id.trim(); | ||
53 | + } | ||
54 | + | ||
55 | + public String getWarchkeeper() { | ||
56 | + return warchkeeper; | ||
57 | + } | ||
58 | + | ||
59 | + public void setWarchkeeper(String warchkeeper) { | ||
60 | + this.warchkeeper = warchkeeper == null ? null : warchkeeper.trim(); | ||
61 | + } | ||
62 | + | ||
63 | + public Date getHandovershifttime() { | ||
64 | + return handovershifttime; | ||
65 | + } | ||
66 | + | ||
67 | + public void setHandovershifttime(Date handovershifttime) { | ||
68 | + this.handovershifttime = handovershifttime; | ||
69 | + } | ||
70 | + | ||
71 | + public String getPubliclighting() { | ||
72 | + return publiclighting; | ||
73 | + } | ||
74 | + | ||
75 | + public void setPubliclighting(String publiclighting) { | ||
76 | + this.publiclighting = publiclighting == null ? null : publiclighting.trim(); | ||
77 | + } | ||
78 | + | ||
79 | + public String getCarpark() { | ||
80 | + return carpark; | ||
81 | + } | ||
82 | + | ||
83 | + public void setCarpark(String carpark) { | ||
84 | + this.carpark = carpark == null ? null : carpark.trim(); | ||
85 | + } | ||
86 | + | ||
87 | + public String getCampusafforestation() { | ||
88 | + return campusafforestation; | ||
89 | + } | ||
90 | + | ||
91 | + public void setCampusafforestation(String campusafforestation) { | ||
92 | + this.campusafforestation = campusafforestation == null ? null : campusafforestation.trim(); | ||
93 | + } | ||
94 | + | ||
95 | + public String getFirefightingequipment() { | ||
96 | + return firefightingequipment; | ||
97 | + } | ||
98 | + | ||
99 | + public void setFirefightingequipment(String firefightingequipment) { | ||
100 | + this.firefightingequipment = firefightingequipment == null ? null : firefightingequipment.trim(); | ||
101 | + } | ||
102 | + | ||
103 | + public String getEquipmentfacilities() { | ||
104 | + return equipmentfacilities; | ||
105 | + } | ||
106 | + | ||
107 | + public void setEquipmentfacilities(String equipmentfacilities) { | ||
108 | + this.equipmentfacilities = equipmentfacilities == null ? null : equipmentfacilities.trim(); | ||
109 | + } | ||
110 | + | ||
111 | + public String getPublicsanitation() { | ||
112 | + return publicsanitation; | ||
113 | + } | ||
114 | + | ||
115 | + public void setPublicsanitation(String publicsanitation) { | ||
116 | + this.publicsanitation = publicsanitation == null ? null : publicsanitation.trim(); | ||
117 | + } | ||
118 | + | ||
119 | + public String getProperty() { | ||
120 | + return property; | ||
121 | + } | ||
122 | + | ||
123 | + public void setProperty(String property) { | ||
124 | + this.property = property == null ? null : property.trim(); | ||
125 | + } | ||
126 | + | ||
127 | + public String getSecuritydanger() { | ||
128 | + return securitydanger; | ||
129 | + } | ||
130 | + | ||
131 | + public void setSecuritydanger(String securitydanger) { | ||
132 | + this.securitydanger = securitydanger == null ? null : securitydanger.trim(); | ||
133 | + } | ||
134 | + | ||
135 | + public String getRests() { | ||
136 | + return rests; | ||
137 | + } | ||
138 | + | ||
139 | + public void setRests(String rests) { | ||
140 | + this.rests = rests == null ? null : rests.trim(); | ||
141 | + } | ||
142 | + | ||
143 | + public String getHandovermatters() { | ||
144 | + return handovermatters; | ||
145 | + } | ||
146 | + | ||
147 | + public void setHandovermatters(String handovermatters) { | ||
148 | + this.handovermatters = handovermatters == null ? null : handovermatters.trim(); | ||
149 | + } | ||
150 | + | ||
151 | + public Date getCreatime() { | ||
152 | + return creatime; | ||
153 | + } | ||
154 | + | ||
155 | + public void setCreatime(Date creatime) { | ||
156 | + this.creatime = creatime; | ||
157 | + } | ||
158 | + | ||
159 | + public Integer getUserid() { | ||
160 | + return userid; | ||
161 | + } | ||
162 | + | ||
163 | + public void setUserid(Integer userid) { | ||
164 | + this.userid = userid; | ||
165 | + } | ||
166 | + | ||
167 | + public String getRemberk1() { | ||
168 | + return remberk1; | ||
169 | + } | ||
170 | + | ||
171 | + public void setRemberk1(String remberk1) { | ||
172 | + this.remberk1 = remberk1 == null ? null : remberk1.trim(); | ||
173 | + } | ||
174 | + | ||
175 | + public String getRemberk2() { | ||
176 | + return remberk2; | ||
177 | + } | ||
178 | + | ||
179 | + public void setRemberk2(String remberk2) { | ||
180 | + this.remberk2 = remberk2 == null ? null : remberk2.trim(); | ||
181 | + } | ||
182 | + | ||
183 | + public String getRemberk3() { | ||
184 | + return remberk3; | ||
185 | + } | ||
186 | + | ||
187 | + public void setRemberk3(String remberk3) { | ||
188 | + this.remberk3 = remberk3 == null ? null : remberk3.trim(); | ||
189 | + } | ||
190 | +} |
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.StaffApartmentComeCar; | ||
6 | + | ||
7 | +public interface ComeCarService { | ||
8 | + | ||
9 | + PageInfo<StaffApartmentComeCar> findAll(int pageNum, int pageSize, String company); | ||
10 | + | ||
11 | + int insertSelective(StaffApartmentComeCar staffApartmentComeCar); | ||
12 | + | ||
13 | + int updateByPrimaryKeySelective(StaffApartmentComeCar staffApartmentComeCar); | ||
14 | + | ||
15 | + int deleteByPrimaryKey(String id); | ||
16 | + | ||
17 | +} |
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.StaffApartmentComeCarMapper; | ||
9 | +import com.tianbo.warehouse.model.Company; | ||
10 | +import com.tianbo.warehouse.model.Group_company; | ||
11 | +import com.tianbo.warehouse.model.StaffApartmentComeCar; | ||
12 | +import com.tianbo.warehouse.service.CompanyService; | ||
13 | +import com.tianbo.warehouse.service.satff.ComeCarService; | ||
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 ComeCayServiceImp implements ComeCarService { | ||
23 | + | ||
24 | + @Autowired | ||
25 | + StaffApartmentComeCarMapper staffApartmentComeCarMapper; | ||
26 | + | ||
27 | + @Override | ||
28 | + public PageInfo<StaffApartmentComeCar> findAll(int pageNum, int pageSize, String companyName) { | ||
29 | + Page<StaffApartmentComeCar> page = PageHelper.startPage(pageNum,pageSize); | ||
30 | + List<StaffApartmentComeCar> list = staffApartmentComeCarMapper.findAll(companyName); | ||
31 | + | ||
32 | + PageInfo<StaffApartmentComeCar> result = new PageInfo<>(list); | ||
33 | + return result; | ||
34 | + } | ||
35 | + | ||
36 | + @Override | ||
37 | + public int insertSelective(StaffApartmentComeCar staffApartmentComeCar) { | ||
38 | + staffApartmentComeCar.setId(UUID.randomUUID().toString()); | ||
39 | + staffApartmentComeCar.setCreatetime(new Date()); | ||
40 | + return staffApartmentComeCarMapper.insertSelective(staffApartmentComeCar); | ||
41 | + } | ||
42 | + | ||
43 | + @Override | ||
44 | + public int updateByPrimaryKeySelective(StaffApartmentComeCar staffApartmentComeCar) { | ||
45 | + staffApartmentComeCar.setCreatetime(new Date()); | ||
46 | + return staffApartmentComeCarMapper.updateByPrimaryKeySelective(staffApartmentComeCar); | ||
47 | + } | ||
48 | + | ||
49 | + @Override | ||
50 | + public int deleteByPrimaryKey(String companyId) { | ||
51 | + if (companyId.contains(",")){ | ||
52 | + try { | ||
53 | + String[] split = companyId.split(","); | ||
54 | + for (int i=0; i<split.length; i++){ | ||
55 | + staffApartmentComeCarMapper.deleteByPrimaryKey(split[i]); | ||
56 | + } | ||
57 | + return 1; | ||
58 | + }catch (Exception e){ | ||
59 | + e.printStackTrace(); | ||
60 | + return 0; | ||
61 | + } | ||
62 | + }else { | ||
63 | + | ||
64 | + return staffApartmentComeCarMapper.deleteByPrimaryKey(companyId); | ||
65 | + } | ||
66 | + } | ||
67 | +} |
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.StaffApartmentOndutyMapper; | ||
7 | +import com.tianbo.warehouse.model.StaffApartmentOnduty; | ||
8 | +import com.tianbo.warehouse.service.satff.OnDutyService; | ||
9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
10 | +import org.springframework.stereotype.Service; | ||
11 | + | ||
12 | +import java.util.Date; | ||
13 | +import java.util.List; | ||
14 | +import java.util.UUID; | ||
15 | + | ||
16 | +@Service | ||
17 | +public class OnDutyServiceImp implements OnDutyService { | ||
18 | + | ||
19 | + @Autowired | ||
20 | + StaffApartmentOndutyMapper staffApartmentOndutyMapper; | ||
21 | + | ||
22 | + @Override | ||
23 | + public PageInfo<StaffApartmentOnduty> findAll(int pageNum, int pageSize, String name) { | ||
24 | + Page<StaffApartmentOnduty> page = PageHelper.startPage(pageNum,pageSize); | ||
25 | + List<StaffApartmentOnduty> list = staffApartmentOndutyMapper.findAll(name); | ||
26 | + | ||
27 | + | ||
28 | + PageInfo<StaffApartmentOnduty> result = new PageInfo<>(list); | ||
29 | + return result; | ||
30 | + } | ||
31 | + | ||
32 | + @Override | ||
33 | + public int insertSelective(StaffApartmentOnduty staffApartmentOnduty) { | ||
34 | + staffApartmentOnduty.setId(UUID.randomUUID().toString()); | ||
35 | + staffApartmentOnduty.setCreatime(new Date()); | ||
36 | + return staffApartmentOndutyMapper.insertSelective(staffApartmentOnduty); | ||
37 | + } | ||
38 | + | ||
39 | + @Override | ||
40 | + public int updateByPrimaryKeySelective(StaffApartmentOnduty staffApartmentOnduty) { | ||
41 | + staffApartmentOnduty.setCreatime(new Date()); | ||
42 | + return staffApartmentOndutyMapper.updateByPrimaryKeySelective(staffApartmentOnduty); | ||
43 | + } | ||
44 | + | ||
45 | + @Override | ||
46 | + public int deleteByPrimaryKey(String companyId) { | ||
47 | + if (companyId.contains(",")){ | ||
48 | + try { | ||
49 | + String[] split = companyId.split(","); | ||
50 | + for (int i=0; i<split.length; i++){ | ||
51 | + staffApartmentOndutyMapper.deleteByPrimaryKey(split[i]); | ||
52 | + } | ||
53 | + return 1; | ||
54 | + }catch (Exception e){ | ||
55 | + e.printStackTrace(); | ||
56 | + return 0; | ||
57 | + } | ||
58 | + }else { | ||
59 | + | ||
60 | + return staffApartmentOndutyMapper.deleteByPrimaryKey(companyId); | ||
61 | + } | ||
62 | + } | ||
63 | + | ||
64 | +} |
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.StaffApartmentOnduty; | ||
6 | + | ||
7 | +import java.util.List; | ||
8 | + | ||
9 | +public interface OnDutyService { | ||
10 | + | ||
11 | + PageInfo<StaffApartmentOnduty> findAll(int pageNum, int pageSize, String name); | ||
12 | + | ||
13 | + int insertSelective(StaffApartmentOnduty company); | ||
14 | + | ||
15 | + int updateByPrimaryKeySelective(StaffApartmentOnduty company); | ||
16 | + | ||
17 | + int deleteByPrimaryKey(String companyId); | ||
18 | + | ||
19 | +} |
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.StaffApartmentComeCarMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.StaffApartmentComeCar" > | ||
5 | + <id column="id" property="id" jdbcType="VARCHAR" /> | ||
6 | + <result column="dateTime" property="datetime" jdbcType="TIMESTAMP" /> | ||
7 | + <result column="comeToVisitDate" property="cometovisitdate" jdbcType="TIMESTAMP" /> | ||
8 | + <result column="leaveDate" property="leavedate" jdbcType="TIMESTAMP" /> | ||
9 | + <result column="comeToVisitName" property="cometovisitname" jdbcType="VARCHAR" /> | ||
10 | + <result column="carNumber" property="carnumber" jdbcType="VARCHAR" /> | ||
11 | + <result column="phone" property="phone" jdbcType="VARCHAR" /> | ||
12 | + <result column="comeMatter" property="comematter" jdbcType="VARCHAR" /> | ||
13 | + <result column="warchkeeper" property="warchkeeper" jdbcType="VARCHAR" /> | ||
14 | + <result column="remark1" property="remark1" jdbcType="VARCHAR" /> | ||
15 | + <result column="remark2" property="remark2" jdbcType="VARCHAR" /> | ||
16 | + <result column="remark3" property="remark3" jdbcType="VARCHAR" /> | ||
17 | + <result column="userId" property="userid" jdbcType="INTEGER" /> | ||
18 | + <result column="createTime" property="createtime" jdbcType="TIMESTAMP" /> | ||
19 | + </resultMap> | ||
20 | + <sql id="Base_Column_List" > | ||
21 | + id, dateTime, comeToVisitDate, leaveDate, comeToVisitName, carNumber, phone, comeMatter, | ||
22 | + warchkeeper, remark1, remark2, remark3, userId, createTime | ||
23 | + </sql> | ||
24 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
25 | + select | ||
26 | + <include refid="Base_Column_List" /> | ||
27 | + from staff_aparment_come_car | ||
28 | + where id = #{id,jdbcType=VARCHAR} | ||
29 | + </select> | ||
30 | + | ||
31 | + <select id="findAll" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
32 | + select | ||
33 | + <include refid="Base_Column_List" /> | ||
34 | + from staff_aparment_come_car | ||
35 | + <if test="comeToVisitName != null and comeToVisitName!=''" > | ||
36 | + where comeToVisitName = #{comeToVisitName, jdbcType=VARCHAR} | ||
37 | + </if> | ||
38 | + </select> | ||
39 | + | ||
40 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > | ||
41 | + delete from staff_aparment_come_car | ||
42 | + where id = #{id,jdbcType=VARCHAR} | ||
43 | + </delete> | ||
44 | + <insert id="insert" parameterType="com.tianbo.warehouse.model.StaffApartmentComeCar" > | ||
45 | + insert into staff_aparment_come_car (id, dateTime, comeToVisitDate, | ||
46 | + leaveDate, comeToVisitName, carNumber, | ||
47 | + phone, comeMatter, warchkeeper, | ||
48 | + remark1, remark2, remark3, | ||
49 | + userId, createTime) | ||
50 | + values (#{id,jdbcType=VARCHAR}, #{datetime,jdbcType=TIMESTAMP}, #{cometovisitdate,jdbcType=TIMESTAMP}, | ||
51 | + #{leavedate,jdbcType=TIMESTAMP}, #{cometovisitname,jdbcType=VARCHAR}, #{carnumber,jdbcType=VARCHAR}, | ||
52 | + #{phone,jdbcType=VARCHAR}, #{comematter,jdbcType=VARCHAR}, #{warchkeeper,jdbcType=VARCHAR}, | ||
53 | + #{remark1,jdbcType=VARCHAR}, #{remark2,jdbcType=VARCHAR}, #{remark3,jdbcType=VARCHAR}, | ||
54 | + #{userid,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}) | ||
55 | + </insert> | ||
56 | + <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffApartmentComeCar" > | ||
57 | + insert into staff_aparment_come_car | ||
58 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
59 | + <if test="id != null" > | ||
60 | + id, | ||
61 | + </if> | ||
62 | + <if test="datetime != null" > | ||
63 | + dateTime, | ||
64 | + </if> | ||
65 | + <if test="cometovisitdate != null" > | ||
66 | + comeToVisitDate, | ||
67 | + </if> | ||
68 | + <if test="leavedate != null" > | ||
69 | + leaveDate, | ||
70 | + </if> | ||
71 | + <if test="cometovisitname != null" > | ||
72 | + comeToVisitName, | ||
73 | + </if> | ||
74 | + <if test="carnumber != null" > | ||
75 | + carNumber, | ||
76 | + </if> | ||
77 | + <if test="phone != null" > | ||
78 | + phone, | ||
79 | + </if> | ||
80 | + <if test="comematter != null" > | ||
81 | + comeMatter, | ||
82 | + </if> | ||
83 | + <if test="warchkeeper != null" > | ||
84 | + warchkeeper, | ||
85 | + </if> | ||
86 | + <if test="remark1 != null" > | ||
87 | + remark1, | ||
88 | + </if> | ||
89 | + <if test="remark2 != null" > | ||
90 | + remark2, | ||
91 | + </if> | ||
92 | + <if test="remark3 != null" > | ||
93 | + remark3, | ||
94 | + </if> | ||
95 | + <if test="userid != null" > | ||
96 | + userId, | ||
97 | + </if> | ||
98 | + <if test="createtime != null" > | ||
99 | + createTime, | ||
100 | + </if> | ||
101 | + </trim> | ||
102 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
103 | + <if test="id != null" > | ||
104 | + #{id,jdbcType=VARCHAR}, | ||
105 | + </if> | ||
106 | + <if test="datetime != null" > | ||
107 | + #{datetime,jdbcType=TIMESTAMP}, | ||
108 | + </if> | ||
109 | + <if test="cometovisitdate != null" > | ||
110 | + #{cometovisitdate,jdbcType=TIMESTAMP}, | ||
111 | + </if> | ||
112 | + <if test="leavedate != null" > | ||
113 | + #{leavedate,jdbcType=TIMESTAMP}, | ||
114 | + </if> | ||
115 | + <if test="cometovisitname != null" > | ||
116 | + #{cometovisitname,jdbcType=VARCHAR}, | ||
117 | + </if> | ||
118 | + <if test="carnumber != null" > | ||
119 | + #{carnumber,jdbcType=VARCHAR}, | ||
120 | + </if> | ||
121 | + <if test="phone != null" > | ||
122 | + #{phone,jdbcType=VARCHAR}, | ||
123 | + </if> | ||
124 | + <if test="comematter != null" > | ||
125 | + #{comematter,jdbcType=VARCHAR}, | ||
126 | + </if> | ||
127 | + <if test="warchkeeper != null" > | ||
128 | + #{warchkeeper,jdbcType=VARCHAR}, | ||
129 | + </if> | ||
130 | + <if test="remark1 != null" > | ||
131 | + #{remark1,jdbcType=VARCHAR}, | ||
132 | + </if> | ||
133 | + <if test="remark2 != null" > | ||
134 | + #{remark2,jdbcType=VARCHAR}, | ||
135 | + </if> | ||
136 | + <if test="remark3 != null" > | ||
137 | + #{remark3,jdbcType=VARCHAR}, | ||
138 | + </if> | ||
139 | + <if test="userid != null" > | ||
140 | + #{userid,jdbcType=INTEGER}, | ||
141 | + </if> | ||
142 | + <if test="createtime != null" > | ||
143 | + #{createtime,jdbcType=TIMESTAMP}, | ||
144 | + </if> | ||
145 | + </trim> | ||
146 | + </insert> | ||
147 | + <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.StaffApartmentComeCar" > | ||
148 | + update staff_aparment_come_car | ||
149 | + <set > | ||
150 | + <if test="datetime != null" > | ||
151 | + dateTime = #{datetime,jdbcType=TIMESTAMP}, | ||
152 | + </if> | ||
153 | + <if test="cometovisitdate != null" > | ||
154 | + comeToVisitDate = #{cometovisitdate,jdbcType=TIMESTAMP}, | ||
155 | + </if> | ||
156 | + <if test="leavedate != null" > | ||
157 | + leaveDate = #{leavedate,jdbcType=TIMESTAMP}, | ||
158 | + </if> | ||
159 | + <if test="cometovisitname != null" > | ||
160 | + comeToVisitName = #{cometovisitname,jdbcType=VARCHAR}, | ||
161 | + </if> | ||
162 | + <if test="carnumber != null" > | ||
163 | + carNumber = #{carnumber,jdbcType=VARCHAR}, | ||
164 | + </if> | ||
165 | + <if test="phone != null" > | ||
166 | + phone = #{phone,jdbcType=VARCHAR}, | ||
167 | + </if> | ||
168 | + <if test="comematter != null" > | ||
169 | + comeMatter = #{comematter,jdbcType=VARCHAR}, | ||
170 | + </if> | ||
171 | + <if test="warchkeeper != null" > | ||
172 | + warchkeeper = #{warchkeeper,jdbcType=VARCHAR}, | ||
173 | + </if> | ||
174 | + <if test="remark1 != null" > | ||
175 | + remark1 = #{remark1,jdbcType=VARCHAR}, | ||
176 | + </if> | ||
177 | + <if test="remark2 != null" > | ||
178 | + remark2 = #{remark2,jdbcType=VARCHAR}, | ||
179 | + </if> | ||
180 | + <if test="remark3 != null" > | ||
181 | + remark3 = #{remark3,jdbcType=VARCHAR}, | ||
182 | + </if> | ||
183 | + <if test="userid != null" > | ||
184 | + userId = #{userid,jdbcType=INTEGER}, | ||
185 | + </if> | ||
186 | + <if test="createtime != null" > | ||
187 | + createTime = #{createtime,jdbcType=TIMESTAMP}, | ||
188 | + </if> | ||
189 | + </set> | ||
190 | + where id = #{id,jdbcType=VARCHAR} | ||
191 | + </update> | ||
192 | + <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.StaffApartmentComeCar" > | ||
193 | + update staff_aparment_come_car | ||
194 | + set dateTime = #{datetime,jdbcType=TIMESTAMP}, | ||
195 | + comeToVisitDate = #{cometovisitdate,jdbcType=TIMESTAMP}, | ||
196 | + leaveDate = #{leavedate,jdbcType=TIMESTAMP}, | ||
197 | + comeToVisitName = #{cometovisitname,jdbcType=VARCHAR}, | ||
198 | + carNumber = #{carnumber,jdbcType=VARCHAR}, | ||
199 | + phone = #{phone,jdbcType=VARCHAR}, | ||
200 | + comeMatter = #{comematter,jdbcType=VARCHAR}, | ||
201 | + warchkeeper = #{warchkeeper,jdbcType=VARCHAR}, | ||
202 | + remark1 = #{remark1,jdbcType=VARCHAR}, | ||
203 | + remark2 = #{remark2,jdbcType=VARCHAR}, | ||
204 | + remark3 = #{remark3,jdbcType=VARCHAR}, | ||
205 | + userId = #{userid,jdbcType=INTEGER}, | ||
206 | + createTime = #{createtime,jdbcType=TIMESTAMP} | ||
207 | + where id = #{id,jdbcType=VARCHAR} | ||
208 | + </update> | ||
209 | +</mapper> |
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.StaffApartmentOndutyMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.StaffApartmentOnduty" > | ||
5 | + <id column="id" property="id" jdbcType="VARCHAR" /> | ||
6 | + <result column="warchkeeper" property="warchkeeper" jdbcType="VARCHAR" /> | ||
7 | + <result column="handOverShiftTime" property="handovershifttime" jdbcType="TIMESTAMP" /> | ||
8 | + <result column="publicLighting" property="publiclighting" jdbcType="VARCHAR" /> | ||
9 | + <result column="carPark" property="carpark" jdbcType="VARCHAR" /> | ||
10 | + <result column="campusAfforestation" property="campusafforestation" jdbcType="VARCHAR" /> | ||
11 | + <result column="fireFightingEquipment" property="firefightingequipment" jdbcType="VARCHAR" /> | ||
12 | + <result column="equipmentFacilities" property="equipmentfacilities" jdbcType="VARCHAR" /> | ||
13 | + <result column="publicSanitation" property="publicsanitation" jdbcType="VARCHAR" /> | ||
14 | + <result column="property" property="property" jdbcType="VARCHAR" /> | ||
15 | + <result column="securityDanger" property="securitydanger" jdbcType="VARCHAR" /> | ||
16 | + <result column="rests" property="rests" jdbcType="VARCHAR" /> | ||
17 | + <result column="handoverMatters" property="handovermatters" jdbcType="VARCHAR" /> | ||
18 | + <result column="creaTime" property="creatime" jdbcType="TIMESTAMP" /> | ||
19 | + <result column="userId" property="userid" jdbcType="INTEGER" /> | ||
20 | + <result column="remberk1" property="remberk1" jdbcType="VARCHAR" /> | ||
21 | + <result column="remberk2" property="remberk2" jdbcType="VARCHAR" /> | ||
22 | + <result column="remberk3" property="remberk3" jdbcType="VARCHAR" /> | ||
23 | + </resultMap> | ||
24 | + <sql id="Base_Column_List" > | ||
25 | + id, warchkeeper, handOverShiftTime, publicLighting, carPark, campusAfforestation, | ||
26 | + fireFightingEquipment, equipmentFacilities, publicSanitation, property, securityDanger, | ||
27 | + rests, handoverMatters, creaTime, userId, remberk1, remberk2, remberk3 | ||
28 | + </sql> | ||
29 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
30 | + select | ||
31 | + <include refid="Base_Column_List" /> | ||
32 | + from staff_apartment_on_duty | ||
33 | + where id = #{id,jdbcType=VARCHAR} | ||
34 | + </select> | ||
35 | + | ||
36 | + <select id="findAll" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
37 | + select | ||
38 | + <include refid="Base_Column_List" /> | ||
39 | + from staff_apartment_on_duty | ||
40 | + <if test="warchkeeper != null and warchkeeper!=''" > | ||
41 | + where warchkeeper = #{warchkeeper, jdbcType=VARCHAR} | ||
42 | + </if> | ||
43 | + </select> | ||
44 | + | ||
45 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > | ||
46 | + delete from staff_apartment_on_duty | ||
47 | + where id = #{id,jdbcType=VARCHAR} | ||
48 | + </delete> | ||
49 | + <insert id="insert" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" > | ||
50 | + insert into staff_apartment_on_duty (id, warchkeeper, handOverShiftTime, | ||
51 | + publicLighting, carPark, campusAfforestation, | ||
52 | + fireFightingEquipment, equipmentFacilities, | ||
53 | + publicSanitation, property, securityDanger, | ||
54 | + rests, handoverMatters, creaTime, | ||
55 | + userId, remberk1, remberk2, | ||
56 | + remberk3) | ||
57 | + values (#{id,jdbcType=VARCHAR}, #{warchkeeper,jdbcType=VARCHAR}, #{handovershifttime,jdbcType=TIMESTAMP}, | ||
58 | + #{publiclighting,jdbcType=VARCHAR}, #{carpark,jdbcType=VARCHAR}, #{campusafforestation,jdbcType=VARCHAR}, | ||
59 | + #{firefightingequipment,jdbcType=VARCHAR}, #{equipmentfacilities,jdbcType=VARCHAR}, | ||
60 | + #{publicsanitation,jdbcType=VARCHAR}, #{property,jdbcType=VARCHAR}, #{securitydanger,jdbcType=VARCHAR}, | ||
61 | + #{rests,jdbcType=VARCHAR}, #{handovermatters,jdbcType=VARCHAR}, #{creatime,jdbcType=TIMESTAMP}, | ||
62 | + #{userid,jdbcType=INTEGER}, #{remberk1,jdbcType=VARCHAR}, #{remberk2,jdbcType=VARCHAR}, | ||
63 | + #{remberk3,jdbcType=VARCHAR}) | ||
64 | + </insert> | ||
65 | + <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" > | ||
66 | + insert into staff_apartment_on_duty | ||
67 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
68 | + <if test="id != null" > | ||
69 | + id, | ||
70 | + </if> | ||
71 | + <if test="warchkeeper != null" > | ||
72 | + warchkeeper, | ||
73 | + </if> | ||
74 | + <if test="handovershifttime != null" > | ||
75 | + handOverShiftTime, | ||
76 | + </if> | ||
77 | + <if test="publiclighting != null" > | ||
78 | + publicLighting, | ||
79 | + </if> | ||
80 | + <if test="carpark != null" > | ||
81 | + carPark, | ||
82 | + </if> | ||
83 | + <if test="campusafforestation != null" > | ||
84 | + campusAfforestation, | ||
85 | + </if> | ||
86 | + <if test="firefightingequipment != null" > | ||
87 | + fireFightingEquipment, | ||
88 | + </if> | ||
89 | + <if test="equipmentfacilities != null" > | ||
90 | + equipmentFacilities, | ||
91 | + </if> | ||
92 | + <if test="publicsanitation != null" > | ||
93 | + publicSanitation, | ||
94 | + </if> | ||
95 | + <if test="property != null" > | ||
96 | + property, | ||
97 | + </if> | ||
98 | + <if test="securitydanger != null" > | ||
99 | + securityDanger, | ||
100 | + </if> | ||
101 | + <if test="rests != null" > | ||
102 | + rests, | ||
103 | + </if> | ||
104 | + <if test="handovermatters != null" > | ||
105 | + handoverMatters, | ||
106 | + </if> | ||
107 | + <if test="creatime != null" > | ||
108 | + creaTime, | ||
109 | + </if> | ||
110 | + <if test="userid != null" > | ||
111 | + userId, | ||
112 | + </if> | ||
113 | + <if test="remberk1 != null" > | ||
114 | + remberk1, | ||
115 | + </if> | ||
116 | + <if test="remberk2 != null" > | ||
117 | + remberk2, | ||
118 | + </if> | ||
119 | + <if test="remberk3 != null" > | ||
120 | + remberk3, | ||
121 | + </if> | ||
122 | + </trim> | ||
123 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
124 | + <if test="id != null" > | ||
125 | + #{id,jdbcType=VARCHAR}, | ||
126 | + </if> | ||
127 | + <if test="warchkeeper != null" > | ||
128 | + #{warchkeeper,jdbcType=VARCHAR}, | ||
129 | + </if> | ||
130 | + <if test="handovershifttime != null" > | ||
131 | + #{handovershifttime,jdbcType=TIMESTAMP}, | ||
132 | + </if> | ||
133 | + <if test="publiclighting != null" > | ||
134 | + #{publiclighting,jdbcType=VARCHAR}, | ||
135 | + </if> | ||
136 | + <if test="carpark != null" > | ||
137 | + #{carpark,jdbcType=VARCHAR}, | ||
138 | + </if> | ||
139 | + <if test="campusafforestation != null" > | ||
140 | + #{campusafforestation,jdbcType=VARCHAR}, | ||
141 | + </if> | ||
142 | + <if test="firefightingequipment != null" > | ||
143 | + #{firefightingequipment,jdbcType=VARCHAR}, | ||
144 | + </if> | ||
145 | + <if test="equipmentfacilities != null" > | ||
146 | + #{equipmentfacilities,jdbcType=VARCHAR}, | ||
147 | + </if> | ||
148 | + <if test="publicsanitation != null" > | ||
149 | + #{publicsanitation,jdbcType=VARCHAR}, | ||
150 | + </if> | ||
151 | + <if test="property != null" > | ||
152 | + #{property,jdbcType=VARCHAR}, | ||
153 | + </if> | ||
154 | + <if test="securitydanger != null" > | ||
155 | + #{securitydanger,jdbcType=VARCHAR}, | ||
156 | + </if> | ||
157 | + <if test="rests != null" > | ||
158 | + #{rests,jdbcType=VARCHAR}, | ||
159 | + </if> | ||
160 | + <if test="handovermatters != null" > | ||
161 | + #{handovermatters,jdbcType=VARCHAR}, | ||
162 | + </if> | ||
163 | + <if test="creatime != null" > | ||
164 | + #{creatime,jdbcType=TIMESTAMP}, | ||
165 | + </if> | ||
166 | + <if test="userid != null" > | ||
167 | + #{userid,jdbcType=INTEGER}, | ||
168 | + </if> | ||
169 | + <if test="remberk1 != null" > | ||
170 | + #{remberk1,jdbcType=VARCHAR}, | ||
171 | + </if> | ||
172 | + <if test="remberk2 != null" > | ||
173 | + #{remberk2,jdbcType=VARCHAR}, | ||
174 | + </if> | ||
175 | + <if test="remberk3 != null" > | ||
176 | + #{remberk3,jdbcType=VARCHAR}, | ||
177 | + </if> | ||
178 | + </trim> | ||
179 | + </insert> | ||
180 | + <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" > | ||
181 | + update staff_apartment_on_duty | ||
182 | + <set > | ||
183 | + <if test="warchkeeper != null" > | ||
184 | + warchkeeper = #{warchkeeper,jdbcType=VARCHAR}, | ||
185 | + </if> | ||
186 | + <if test="handovershifttime != null" > | ||
187 | + handOverShiftTime = #{handovershifttime,jdbcType=TIMESTAMP}, | ||
188 | + </if> | ||
189 | + <if test="publiclighting != null" > | ||
190 | + publicLighting = #{publiclighting,jdbcType=VARCHAR}, | ||
191 | + </if> | ||
192 | + <if test="carpark != null" > | ||
193 | + carPark = #{carpark,jdbcType=VARCHAR}, | ||
194 | + </if> | ||
195 | + <if test="campusafforestation != null" > | ||
196 | + campusAfforestation = #{campusafforestation,jdbcType=VARCHAR}, | ||
197 | + </if> | ||
198 | + <if test="firefightingequipment != null" > | ||
199 | + fireFightingEquipment = #{firefightingequipment,jdbcType=VARCHAR}, | ||
200 | + </if> | ||
201 | + <if test="equipmentfacilities != null" > | ||
202 | + equipmentFacilities = #{equipmentfacilities,jdbcType=VARCHAR}, | ||
203 | + </if> | ||
204 | + <if test="publicsanitation != null" > | ||
205 | + publicSanitation = #{publicsanitation,jdbcType=VARCHAR}, | ||
206 | + </if> | ||
207 | + <if test="property != null" > | ||
208 | + property = #{property,jdbcType=VARCHAR}, | ||
209 | + </if> | ||
210 | + <if test="securitydanger != null" > | ||
211 | + securityDanger = #{securitydanger,jdbcType=VARCHAR}, | ||
212 | + </if> | ||
213 | + <if test="rests != null" > | ||
214 | + rests = #{rests,jdbcType=VARCHAR}, | ||
215 | + </if> | ||
216 | + <if test="handovermatters != null" > | ||
217 | + handoverMatters = #{handovermatters,jdbcType=VARCHAR}, | ||
218 | + </if> | ||
219 | + <if test="creatime != null" > | ||
220 | + creaTime = #{creatime,jdbcType=TIMESTAMP}, | ||
221 | + </if> | ||
222 | + <if test="userid != null" > | ||
223 | + userId = #{userid,jdbcType=INTEGER}, | ||
224 | + </if> | ||
225 | + <if test="remberk1 != null" > | ||
226 | + remberk1 = #{remberk1,jdbcType=VARCHAR}, | ||
227 | + </if> | ||
228 | + <if test="remberk2 != null" > | ||
229 | + remberk2 = #{remberk2,jdbcType=VARCHAR}, | ||
230 | + </if> | ||
231 | + <if test="remberk3 != null" > | ||
232 | + remberk3 = #{remberk3,jdbcType=VARCHAR}, | ||
233 | + </if> | ||
234 | + </set> | ||
235 | + where id = #{id,jdbcType=VARCHAR} | ||
236 | + </update> | ||
237 | + <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" > | ||
238 | + update staff_apartment_on_duty | ||
239 | + set warchkeeper = #{warchkeeper,jdbcType=VARCHAR}, | ||
240 | + handOverShiftTime = #{handovershifttime,jdbcType=TIMESTAMP}, | ||
241 | + publicLighting = #{publiclighting,jdbcType=VARCHAR}, | ||
242 | + carPark = #{carpark,jdbcType=VARCHAR}, | ||
243 | + campusAfforestation = #{campusafforestation,jdbcType=VARCHAR}, | ||
244 | + fireFightingEquipment = #{firefightingequipment,jdbcType=VARCHAR}, | ||
245 | + equipmentFacilities = #{equipmentfacilities,jdbcType=VARCHAR}, | ||
246 | + publicSanitation = #{publicsanitation,jdbcType=VARCHAR}, | ||
247 | + property = #{property,jdbcType=VARCHAR}, | ||
248 | + securityDanger = #{securitydanger,jdbcType=VARCHAR}, | ||
249 | + rests = #{rests,jdbcType=VARCHAR}, | ||
250 | + handoverMatters = #{handovermatters,jdbcType=VARCHAR}, | ||
251 | + creaTime = #{creatime,jdbcType=TIMESTAMP}, | ||
252 | + userId = #{userid,jdbcType=INTEGER}, | ||
253 | + remberk1 = #{remberk1,jdbcType=VARCHAR}, | ||
254 | + remberk2 = #{remberk2,jdbcType=VARCHAR}, | ||
255 | + remberk3 = #{remberk3,jdbcType=VARCHAR} | ||
256 | + where id = #{id,jdbcType=VARCHAR} | ||
257 | + </update> | ||
258 | +</mapper> |
-
请 注册 或 登录 后发表评论