作者 shenhailong

删除 imf 开启getway 生活保障部门 安全巡检 备用钥匙 设备维修 等增删改查

正在显示 28 个修改的文件 包含 1270 行增加399 行删除
@@ -12,12 +12,15 @@ spring: @@ -12,12 +12,15 @@ spring:
12 #静态资源,设置上传文件的访问, 12 #静态资源,设置上传文件的访问,
13 static-path-pattern: /** 13 static-path-pattern: /**
14 14
  15 +
15 resources: 16 resources:
16 static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} 17 static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path}
17 18
18 application: 19 application:
19 name: hqpt-user-center 20 name: hqpt-user-center
20 - 21 + redis:
  22 + host: 192.168.1.53
  23 + port: 6379
21 jackson: 24 jackson:
22 serialization: 25 serialization:
23 FAIL_ON_EMPTY_BEANS: false 26 FAIL_ON_EMPTY_BEANS: false
  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.StaffApartmentSpareKey;
  8 +import com.tianbo.warehouse.model.StaffSecurityInspection;
  9 +import com.tianbo.warehouse.service.satff.KeyService;
  10 +import com.tianbo.warehouse.service.satff.StaffSecurityInspectionService;
  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("/key")
  20 +public class KeyController {
  21 +
  22 + @Autowired
  23 + KeyService keyService;
  24 +
  25 + @GetMapping("/list")
  26 + public PageInfo<StaffApartmentSpareKey> 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 = "staffname", required = false)
  31 + String staffname){
  32 + return keyService.findAll(pageNum,pageSize,staffname);
  33 +
  34 + }
  35 +
  36 + @LogAnnotation(moduleName = "职工公寓备用钥匙使用记录管理",operate = "职工公寓备用钥匙使用记录添加")
  37 + @PostMapping("/add")
  38 + public ResultJson add(@RequestBody StaffApartmentSpareKey staffApartmentSpareKey){
  39 +
  40 + int i =keyService.insertSelective(staffApartmentSpareKey);
  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 StaffApartmentSpareKey staffApartmentSpareKey){
  55 +
  56 + int i =keyService.updateByPrimaryKeySelective(staffApartmentSpareKey);
  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 StaffApartmentSpareKey staffApartmentSpareKey, HttpServletRequest request, HttpServletResponse response){
  70 +
  71 + int i =keyService.deleteByPrimaryKey(staffApartmentSpareKey.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 (keyService.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.StaffApartmentSpareKey;
  9 +import com.tianbo.warehouse.service.satff.KeyService;
  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("/maintain")
  20 +public class MaintainController {
  21 +
  22 + @Autowired
  23 + MaintainService maintainService;
  24 +
  25 + @GetMapping("/list")
  26 + public PageInfo<StaffApartmentMaintain> 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 = "repairsname", required = false)
  31 + String repairsname){
  32 + return maintainService.findAll(pageNum,pageSize,repairsname);
  33 +
  34 + }
  35 +
  36 + @LogAnnotation(moduleName = "职工公寓设施设备维修记录管理",operate = "职工公寓设施设备维修记录添加")
  37 + @PostMapping("/add")
  38 + public ResultJson add(@RequestBody StaffApartmentMaintain staffApartmentMaintain){
  39 +
  40 + int i =maintainService.insertSelective(staffApartmentMaintain);
  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 StaffApartmentMaintain staffApartmentMaintain){
  55 +
  56 + int i =maintainService.updateByPrimaryKeySelective(staffApartmentMaintain);
  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 StaffApartmentMaintain staffApartmentMaintain, HttpServletRequest request, HttpServletResponse response){
  70 +
  71 + int i =maintainService.deleteByPrimaryKey(staffApartmentMaintain.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 (maintainService.deleteByPrimaryKey(ids)>0){
  89 + resultJson = new ResultJson("200","删除成功");
  90 + }else {
  91 + resultJson = new ResultJson("500","insert faild");
  92 + }
  93 + return resultJson;
  94 + }
  95 +
  96 +}
@@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletResponse; @@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletResponse;
14 import javax.validation.Valid; 14 import javax.validation.Valid;
15 15
16 @RestController 16 @RestController
17 -@RequestMapping("/stall") 17 +@RequestMapping("/inspection")
18 public class StaffSecurityInspectionController { 18 public class StaffSecurityInspectionController {
19 19
20 @Autowired 20 @Autowired
@@ -24,8 +24,10 @@ public class StaffSecurityInspectionController { @@ -24,8 +24,10 @@ public class StaffSecurityInspectionController {
24 public PageInfo<StaffSecurityInspection> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1") 24 public PageInfo<StaffSecurityInspection> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1")
25 int pageNum, 25 int pageNum,
26 @RequestParam(value = "pageSize",required = false,defaultValue = "5") 26 @RequestParam(value = "pageSize",required = false,defaultValue = "5")
27 - int pageSize){  
28 - return staffSecurityInspectionService.findAll(pageNum,pageSize); 27 + int pageSize,
  28 + @RequestParam(value = "securityInspectionName", required = false)
  29 + String securityInspectionName){
  30 + return staffSecurityInspectionService.findAll(pageNum,pageSize,securityInspectionName);
29 31
30 } 32 }
31 33
  1 +package com.tianbo.warehouse.dao;
  2 +
  3 +import com.tianbo.warehouse.model.StaffApartmentMaintain;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface StaffApartmentMaintainMapper {
  9 + int deleteByPrimaryKey(String id);
  10 +
  11 + int insert(StaffApartmentMaintain record);
  12 +
  13 + int insertSelective(StaffApartmentMaintain record);
  14 +
  15 + StaffApartmentMaintain selectByPrimaryKey(String id);
  16 +
  17 + int updateByPrimaryKeySelective(StaffApartmentMaintain record);
  18 +
  19 + int updateByPrimaryKey(StaffApartmentMaintain record);
  20 +
  21 + List<StaffApartmentMaintain> findAll(@Param("repairsname") String repairsname);
  22 +}
  1 +package com.tianbo.warehouse.dao;
  2 +
  3 +import com.tianbo.warehouse.model.StaffApartmentSpareKey;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface StaffApartmentSpareKeyMapper {
  9 + int deleteByPrimaryKey(String id);
  10 +
  11 + int insert(StaffApartmentSpareKey record);
  12 +
  13 + int insertSelective(StaffApartmentSpareKey record);
  14 +
  15 + StaffApartmentSpareKey selectByPrimaryKey(String id);
  16 +
  17 + int updateByPrimaryKeySelective(StaffApartmentSpareKey record);
  18 +
  19 + int updateByPrimaryKey(StaffApartmentSpareKey record);
  20 +
  21 + List<StaffApartmentSpareKey> findAll(@Param("staffname") String staffname);
  22 +}
1 package com.tianbo.warehouse.dao; 1 package com.tianbo.warehouse.dao;
2 2
3 import com.tianbo.warehouse.model.StaffSecurityInspection; 3 import com.tianbo.warehouse.model.StaffSecurityInspection;
  4 +import org.apache.ibatis.annotations.Param;
4 5
5 import java.util.List; 6 import java.util.List;
6 7
@@ -17,5 +18,5 @@ public interface StaffSecurityInspectionMapper { @@ -17,5 +18,5 @@ public interface StaffSecurityInspectionMapper {
17 18
18 int updateByPrimaryKey(StaffSecurityInspection record); 19 int updateByPrimaryKey(StaffSecurityInspection record);
19 20
20 - List<StaffSecurityInspection> findAll(); 21 + List<StaffSecurityInspection>findAll(@Param("securityInspectionName") String securityInspectionName);
21 } 22 }
1 -package com.tianbo.warehouse.imf;  
2 -  
3 -import com.caac.imf.api.IMFClient;  
4 -import com.tianbo.warehouse.imf.handle.IMFSaveHandle;  
5 -import com.tianbo.warehouse.imf.schedul.IMF_Task;  
6 -import org.apache.log4j.Logger;  
7 -  
8 -public class IMF_Reader extends Thread{  
9 - protected static final Logger logger = Logger.getLogger(IMF_Reader.class);  
10 - private IMFClient client;  
11 - public static boolean isrunning;  
12 -  
13 - public IMF_Reader(IMFClient client) {  
14 - this.client = client;  
15 - }  
16 -  
17 - @Override  
18 - public void run() {  
19 - try{  
20 - isrunning =true;  
21 - while(true) {  
22 - if (IMF_Task.LOGIN_OK) {  
23 - String message = this.client.getMSG();  
24 - if (message != null) {  
25 - IMFSaveHandle imfSaveHandle = new IMFSaveHandle();  
26 - imfSaveHandle.handle(message);  
27 - }  
28 -  
29 - } else {  
30 - //logger.info("***");  
31 - }  
32 -  
33 - try {  
34 - Thread.sleep(500L);  
35 - } catch (InterruptedException var3) {  
36 - var3.printStackTrace();  
37 -  
38 - }  
39 - }  
40 -  
41 - }catch (Exception e){  
42 - e.printStackTrace();  
43 - }  
44 - isrunning=false;  
45 - logger.info("****************读取线程不在了****************");  
46 - }  
47 -}  
1 -package com.tianbo.warehouse.imf;  
2 -  
3 -import com.caac.imf.api.IMFClient;  
4 -import com.tianbo.warehouse.imf.schedul.IMF_Task;  
5 -import com.tianbo.warehouse.util.Date.DateUtil;  
6 -import com.tianbo.warehouse.util.IO.FileTool;  
7 -import com.tianbo.warehouse.util.XML.MakeImfMeta;  
8 -import org.apache.commons.io.FileUtils;  
9 -import org.apache.log4j.Logger;  
10 -  
11 -import java.io.*;  
12 -import java.util.Iterator;  
13 -import java.util.List;  
14 -  
15 -public class IMF_Sender extends Thread{  
16 -  
17 - protected static final Logger logger = Logger.getLogger(IMF_Sender.class);  
18 - public static boolean isrunning;  
19 - private IMFClient client;  
20 - private String content;  
21 -  
22 - public IMF_Sender(IMFClient client) {  
23 - this.client = client;  
24 - }  
25 - public IMF_Sender(IMFClient client, String content) {  
26 - this.client = client;  
27 - this.content = content;  
28 - }  
29 -  
30 - @Override  
31 - public void run(){  
32 -  
33 - String sendDir = FileTool.readProperties("readDirectory");  
34 - String SNDR = FileTool.readProperties("loginname");  
35 - String TYPE = FileTool.readProperties("TYPE");  
36 - String STYP = FileTool.readProperties("STYP");  
37 - String RCVR = FileTool.readProperties("RCVR");  
38 - String DDTM = DateUtil.getDDTM();  
39 - String SEQN = DDTM;  
40 -  
41 - if (this.client == null) {  
42 - logger.info("IMFClient has been closed");  
43 - return;  
44 - }  
45 - isrunning=true;  
46 - if(IMF_Task.isSuc){  
47 - if(IMF_Task.LOGIN_OK){  
48 - while (true){  
49 - //发送报文  
50 - List<File> files = FileTool.readDirectoryFiles(new File(sendDir));  
51 - String sendMsg = "";  
52 - Iterator<File> it = files.iterator();  
53 - while(it.hasNext()){  
54 - File file = it.next();  
55 - try {  
56 - sendMsg = MakeImfMeta.makeImfDocument(SNDR,RCVR,TYPE,STYP,DDTM,SEQN,file);  
57 - String returnMsg = this.client.sendMSG(sendMsg);  
58 - if(returnMsg.indexOf("<CODE>9</CODE>")>=0){  
59 - FileUtils.forceDelete(file);  
60 - }  
61 - }catch (Exception e){  
62 - e.printStackTrace();  
63 - }  
64 - }  
65 -  
66 - try {  
67 - Thread.sleep(500L);  
68 - } catch (InterruptedException var3) {  
69 - var3.printStackTrace();  
70 - }  
71 - }  
72 - }else{  
73 - logger.info("<<<<<<<<<<<登陆中>>>>>>>>>>>>");  
74 - }  
75 - }  
76 -  
77 -  
78 -  
79 - isrunning=false;  
80 - logger.info("<<<<<<<<<<<发送线程结束>>>>>>>>>>>>");  
81 - }  
82 -  
83 - public String getContent() {  
84 - return content;  
85 - }  
86 -  
87 - public void setContent(String content) {  
88 - this.content = content;  
89 - }  
90 -}  
1 -package com.tianbo.warehouse.imf.handle;  
2 -  
3 -import com.tianbo.warehouse.model.T_ETL_MESSAGE;  
4 -import com.tianbo.warehouse.service.T_ETL_MESSAGEService;  
5 -  
6 -import com.tianbo.warehouse.util.Date.DateUtil;  
7 -import com.tianbo.warehouse.util.IO.FileTool;  
8 -import com.tianbo.warehouse.util.XML.XML2ENTITY;  
9 -import org.apache.log4j.Logger;  
10 -import org.dom4j.Document;  
11 -import org.dom4j.DocumentHelper;  
12 -import org.springframework.beans.factory.annotation.Autowired;  
13 -import org.springframework.stereotype.Component;  
14 -  
15 -import javax.annotation.PostConstruct;  
16 -import java.util.Date;  
17 -import java.util.Map;  
18 -  
19 -/**  
20 - * 存储IMF过来的原始报文到数据仓库T_ELT_MESSAGE原始报文表中  
21 - */  
22 -@Component  
23 -public class IMFSaveHandle {  
24 -  
25 - @Autowired  
26 - protected T_ETL_MESSAGEService messageService;  
27 -  
28 - private static IMFSaveHandle saveHandle;  
29 -  
30 - protected static final Logger logger = Logger.getLogger(IMFSaveHandle.class);  
31 -  
32 - @PostConstruct  
33 - public void init(){  
34 - saveHandle = this;  
35 - saveHandle.messageService = this.messageService;  
36 - }  
37 -  
38 - public void handle(String xmlmessage){  
39 - try {  
40 - //有人发报文头部不按规范发  
41 -// xmlmessage = xmlmessage.replace("<Msg>","<MSG>")  
42 -// .replace("<msg>","<MSG>")  
43 -// .replace("</Msg>","</MSG>")  
44 -// .replace("</msg>","</MSG>");  
45 -  
46 -  
47 - Document document = DocumentHelper.parseText(xmlmessage);  
48 - XML2ENTITY xml2ENTITY =new XML2ENTITY();  
49 - Map xmlMap = xml2ENTITY.Dom2Map(document);  
50 -  
51 - Map meta = (Map) xmlMap.get("META");  
52 -  
53 - T_ETL_MESSAGE message = new T_ETL_MESSAGE();  
54 -  
55 - String sndrm = meta.get("SNDR").toString();  
56 - String stypm = meta.get("STYP").toString();  
57 -  
58 -  
59 -  
60 - if ("TXD".equals(sndrm)){  
61 - //读取配置文件的需要本地存储报文的节点  
62 - String saveStyp= FileTool.readProperties("saveStyp");  
63 - String[] styps = saveStyp.split(",");  
64 - for (String item: styps) {  
65 - if (item.equals(stypm)){  
66 - //存储至备份目录  
67 - FileTool.writeFileToBak(xmlmessage);  
68 - }  
69 - }  
70 - }  
71 -  
72 - String typem = meta.get("TYPE").toString();  
73 - String rcvr = XML2ENTITY.getMap(meta,"RCVR").toString();  
74 - String ddtm = meta.get("DDTM").toString();  
75 - String seqn = meta.get("SEQN").toString();  
76 -  
77 -  
78 -  
79 -  
80 - message.setSndr(sndrm);  
81 - message.setRcvr(rcvr);  
82 - message.setType(typem);  
83 - message.setStyp(stypm);  
84 - message.setSeqn(seqn);  
85 -  
86 -  
87 - Date ddtmDate = DateUtil.formatByyyyyMMddHHmmss(ddtm);  
88 - message.setDdtm(ddtmDate);  
89 - message.setSntm(ddtmDate);  
90 - message.setOper("ALL");  
91 - message.setAppid("W");  
92 - message.setEtltim(new Date());  
93 -  
94 -  
95 -  
96 - message.setContent(xmlmessage);  
97 -  
98 - int i = saveHandle.messageService.insertSelective(message);  
99 - }catch (Exception e){  
100 - FileTool.writeFile("err",e.toString()+"\n"+xmlmessage,false);  
101 - logger.warn("*报文入库失败已存储成备份文件*");  
102 - logger.error(e);  
103 - logger.warn(e);  
104 - }  
105 -  
106 -  
107 -  
108 - }  
109 -}  
1 -package com.tianbo.warehouse.imf.schedul;  
2 -  
3 -import com.caac.imf.api.IMFClient;  
4 -import com.caac.imf.api.IMFClientFactory;  
5 -import com.tianbo.warehouse.imf.IMF_Reader;  
6 -import com.tianbo.warehouse.imf.IMF_Sender;  
7 -import com.tianbo.warehouse.util.IO.FileTool;  
8 -import org.apache.log4j.Logger;  
9 -import org.apache.log4j.PropertyConfigurator;  
10 -import org.springframework.stereotype.Component;  
11 -  
12 -import java.text.SimpleDateFormat;  
13 -  
14 -@Component  
15 -public class IMF_Task {  
16 - protected static final Logger logger = Logger.getLogger(IMF_Task.class);  
17 - private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  
18 - public static boolean LOGIN_OK = false;  
19 - public static boolean isSuc = true;  
20 - public static IMFClient client = null;  
21 - public static String loginname;  
22 - public static String loginpass;  
23 - public static String isNeedSend = "N";  
24 -  
25 -  
26 -// @Scheduled(fixedRate = 5000)  
27 - private static void start() throws Exception {  
28 - PropertyConfigurator.configure("config/log4j.properties");  
29 - client = IMFClientFactory.createInstance();  
30 - loginname= FileTool.readProperties("loginname");  
31 - loginpass= FileTool.readProperties("loginpass");  
32 - isNeedSend= FileTool.readProperties("isNeedSend");  
33 -  
34 -  
35 - //登录  
36 - if (!LOGIN_OK) {  
37 - loginIMF(client, loginname, loginpass, "config/imf_config.properties");  
38 - }  
39 -  
40 - //启动读取线程  
41 - if (client != null) {  
42 - IMF_Reader reader = new IMF_Reader(client);  
43 -  
44 - if (!IMF_Reader.isrunning) {  
45 - reader.start();  
46 - logger.info("*********读取线程已开启***********");  
47 - } else {  
48 - // logger.info("*********读取线程已开启-不再启动线程*********");  
49 - }  
50 -  
51 - if("Y".equals(isNeedSend)){  
52 - IMF_Sender kako_sender = new IMF_Sender(client);  
53 - if(!IMF_Sender.isrunning) {  
54 - kako_sender.start();  
55 - }  
56 - }  
57 -  
58 - }  
59 -  
60 - }  
61 -  
62 - public void sendMsg(String msg){  
63 - if (!msg.equals(null) && !msg.isEmpty()){  
64 - if(LOGIN_OK){  
65 - IMF_Sender sender = new IMF_Sender(client,msg);  
66 - sender.setContent(msg);  
67 - sender.start();  
68 - }  
69 -  
70 - }  
71 -  
72 - }  
73 -  
74 - private static void loginIMF(IMFClient client, String userName, String password, String confFileName) {  
75 - if (client.initial(confFileName)) {  
76 - String message = client.login(userName, password);  
77 - logger.info("message=" + message);  
78 - if (message.indexOf("<CODE>1</CODE>") > 0) {  
79 - logger.info("登陆成功");  
80 - LOGIN_OK = true;  
81 - } else {  
82 - int times = 0;  
83 -  
84 - while(times <= 3) {  
85 - logger.info("try connection...");  
86 - ++times;  
87 - logger.info("message.=" + message);  
88 - if (message.indexOf("<CODE>1</CODE>") > 0) {  
89 - logger.info("登陆成功");  
90 - LOGIN_OK = true;  
91 - break;  
92 - }  
93 -  
94 - logger.info("登录失败~~~~");  
95 - message = client.login(userName, password);  
96 -  
97 - try {  
98 - Thread.sleep(4000L);  
99 - } catch (InterruptedException var7) {  
100 - var7.printStackTrace();  
101 - }  
102 - }  
103 -  
104 - if (!LOGIN_OK) {  
105 - logger.info("多次尝试登录失败,退出登陆");  
106 - client.disconnect();  
107 - isSuc =false;  
108 - System.exit(-1);  
109 - }  
110 - }  
111 - }  
112 -  
113 - }  
114 -  
115 -}  
  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 StaffApartmentMaintain {
  9 + private String id;
  10 +
  11 + @DateTimeFormat(pattern = "yyyy-MM-dd")
  12 + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  13 + private Date repairsdate;
  14 +
  15 + private String repairscontent;
  16 +
  17 + private String reflectway;
  18 +
  19 + private String repairsdept;
  20 +
  21 + private String answerthephonename;
  22 +
  23 + private String repairsname;
  24 +
  25 + private String repairsphone;
  26 +
  27 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  28 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  29 + private Date maintaindate;
  30 +
  31 + private String maintaincase;
  32 +
  33 + private String cooperatemaintainname;
  34 +
  35 + private Integer meno;
  36 +
  37 + private String remark1;
  38 +
  39 + private String remark2;
  40 +
  41 + private String remark3;
  42 +
  43 + private Integer createby;
  44 +
  45 + private Date createtime;
  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 Date getRepairsdate() {
  56 + return repairsdate;
  57 + }
  58 +
  59 + public void setRepairsdate(Date repairsdate) {
  60 + this.repairsdate = repairsdate;
  61 + }
  62 +
  63 + public String getRepairscontent() {
  64 + return repairscontent;
  65 + }
  66 +
  67 + public void setRepairscontent(String repairscontent) {
  68 + this.repairscontent = repairscontent == null ? null : repairscontent.trim();
  69 + }
  70 +
  71 + public String getReflectway() {
  72 + return reflectway;
  73 + }
  74 +
  75 + public void setReflectway(String reflectway) {
  76 + this.reflectway = reflectway == null ? null : reflectway.trim();
  77 + }
  78 +
  79 + public String getRepairsdept() {
  80 + return repairsdept;
  81 + }
  82 +
  83 + public void setRepairsdept(String repairsdept) {
  84 + this.repairsdept = repairsdept == null ? null : repairsdept.trim();
  85 + }
  86 +
  87 + public String getAnswerthephonename() {
  88 + return answerthephonename;
  89 + }
  90 +
  91 + public void setAnswerthephonename(String answerthephonename) {
  92 + this.answerthephonename = answerthephonename == null ? null : answerthephonename.trim();
  93 + }
  94 +
  95 + public String getRepairsname() {
  96 + return repairsname;
  97 + }
  98 +
  99 + public void setRepairsname(String repairsname) {
  100 + this.repairsname = repairsname == null ? null : repairsname.trim();
  101 + }
  102 +
  103 + public String getRepairsphone() {
  104 + return repairsphone;
  105 + }
  106 +
  107 + public void setRepairsphone(String repairsphone) {
  108 + this.repairsphone = repairsphone == null ? null : repairsphone.trim();
  109 + }
  110 +
  111 + public Date getMaintaindate() {
  112 + return maintaindate;
  113 + }
  114 +
  115 + public void setMaintaindate(Date maintaindate) {
  116 + this.maintaindate = maintaindate;
  117 + }
  118 +
  119 + public String getMaintaincase() {
  120 + return maintaincase;
  121 + }
  122 +
  123 + public void setMaintaincase(String maintaincase) {
  124 + this.maintaincase = maintaincase == null ? null : maintaincase.trim();
  125 + }
  126 +
  127 + public String getCooperatemaintainname() {
  128 + return cooperatemaintainname;
  129 + }
  130 +
  131 + public void setCooperatemaintainname(String cooperatemaintainname) {
  132 + this.cooperatemaintainname = cooperatemaintainname == null ? null : cooperatemaintainname.trim();
  133 + }
  134 +
  135 + public Integer getMeno() {
  136 + return meno;
  137 + }
  138 +
  139 + public void setMeno(Integer meno) {
  140 + this.meno = meno;
  141 + }
  142 +
  143 + public String getRemark1() {
  144 + return remark1;
  145 + }
  146 +
  147 + public void setRemark1(String remark1) {
  148 + this.remark1 = remark1 == null ? null : remark1.trim();
  149 + }
  150 +
  151 + public String getRemark2() {
  152 + return remark2;
  153 + }
  154 +
  155 + public void setRemark2(String remark2) {
  156 + this.remark2 = remark2 == null ? null : remark2.trim();
  157 + }
  158 +
  159 + public String getRemark3() {
  160 + return remark3;
  161 + }
  162 +
  163 + public void setRemark3(String remark3) {
  164 + this.remark3 = remark3 == null ? null : remark3.trim();
  165 + }
  166 +
  167 + public Integer getCreateby() {
  168 + return createby;
  169 + }
  170 +
  171 + public void setCreateby(Integer createby) {
  172 + this.createby = createby;
  173 + }
  174 +
  175 + public Date getCreatetime() {
  176 + return createtime;
  177 + }
  178 +
  179 + public void setCreatetime(Date createtime) {
  180 + this.createtime = createtime;
  181 + }
  182 +}
  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 StaffApartmentSpareKey {
  9 + private String id;
  10 +
  11 + @DateTimeFormat(pattern = "yyyy-MM-dd")
  12 + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  13 + private Date usedate;
  14 +
  15 + private String roomnum;
  16 +
  17 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  18 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  19 + private Date usetime;
  20 +
  21 + private String staffname;
  22 +
  23 + private String dept;
  24 +
  25 + private String phone;
  26 +
  27 + private String ictype;
  28 +
  29 + private String iccard;
  30 +
  31 + private String roomduty;
  32 +
  33 + private String remark1;
  34 +
  35 + private String remark2;
  36 +
  37 + private String remark3;
  38 +
  39 + private Integer createby;
  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 getUsedate() {
  52 + return usedate;
  53 + }
  54 +
  55 + public void setUsedate(Date usedate) {
  56 + this.usedate = usedate;
  57 + }
  58 +
  59 + public String getRoomnum() {
  60 + return roomnum;
  61 + }
  62 +
  63 + public void setRoomnum(String roomnum) {
  64 + this.roomnum = roomnum == null ? null : roomnum.trim();
  65 + }
  66 +
  67 + public Date getUsetime() {
  68 + return usetime;
  69 + }
  70 +
  71 + public void setUsetime(Date usetime) {
  72 + this.usetime = usetime;
  73 + }
  74 +
  75 + public String getStaffname() {
  76 + return staffname;
  77 + }
  78 +
  79 + public void setStaffname(String staffname) {
  80 + this.staffname = staffname == null ? null : staffname.trim();
  81 + }
  82 +
  83 + public String getDept() {
  84 + return dept;
  85 + }
  86 +
  87 + public void setDept(String dept) {
  88 + this.dept = dept == null ? null : dept.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 getIctype() {
  100 + return ictype;
  101 + }
  102 +
  103 + public void setIctype(String ictype) {
  104 + this.ictype = ictype == null ? null : ictype.trim();
  105 + }
  106 +
  107 + public String getIccard() {
  108 + return iccard;
  109 + }
  110 +
  111 + public void setIccard(String iccard) {
  112 + this.iccard = iccard == null ? null : iccard.trim();
  113 + }
  114 +
  115 + public String getRoomduty() {
  116 + return roomduty;
  117 + }
  118 +
  119 + public void setRoomduty(String roomduty) {
  120 + this.roomduty = roomduty == null ? null : roomduty.trim();
  121 + }
  122 +
  123 + public String getRemark1() {
  124 + return remark1;
  125 + }
  126 +
  127 + public void setRemark1(String remark1) {
  128 + this.remark1 = remark1 == null ? null : remark1.trim();
  129 + }
  130 +
  131 + public String getRemark2() {
  132 + return remark2;
  133 + }
  134 +
  135 + public void setRemark2(String remark2) {
  136 + this.remark2 = remark2 == null ? null : remark2.trim();
  137 + }
  138 +
  139 + public String getRemark3() {
  140 + return remark3;
  141 + }
  142 +
  143 + public void setRemark3(String remark3) {
  144 + this.remark3 = remark3 == null ? null : remark3.trim();
  145 + }
  146 +
  147 + public Integer getCreateby() {
  148 + return createby;
  149 + }
  150 +
  151 + public void setCreateby(Integer createby) {
  152 + this.createby = createby;
  153 + }
  154 +
  155 + public Date getCreatetime() {
  156 + return createtime;
  157 + }
  158 +
  159 + public void setCreatetime(Date createtime) {
  160 + this.createtime = createtime;
  161 + }
  162 +}
1 package com.tianbo.warehouse.model; 1 package com.tianbo.warehouse.model;
2 2
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +import org.springframework.format.annotation.DateTimeFormat;
  5 +
3 import java.util.Date; 6 import java.util.Date;
4 7
5 public class StaffSecurityInspection { 8 public class StaffSecurityInspection {
@@ -7,6 +10,8 @@ public class StaffSecurityInspection { @@ -7,6 +10,8 @@ public class StaffSecurityInspection {
7 10
8 private String securityInspectionName; 11 private String securityInspectionName;
9 12
  13 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  14 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
10 private Date securityInspectionDate; 15 private Date securityInspectionDate;
11 16
12 private String fireName; 17 private String fireName;
@@ -21,6 +26,8 @@ public class StaffSecurityInspection { @@ -21,6 +26,8 @@ public class StaffSecurityInspection {
21 26
22 private String builders; 27 private String builders;
23 28
  29 + private String otherSituations;
  30 +
24 private Integer userId; 31 private Integer userId;
25 32
26 private String realname; 33 private String realname;
@@ -47,6 +54,7 @@ public class StaffSecurityInspection { @@ -47,6 +54,7 @@ public class StaffSecurityInspection {
47 return securityInspectionDate; 54 return securityInspectionDate;
48 } 55 }
49 56
  57 + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
50 public void setSecurityInspectionDate(Date securityInspectionDate) { 58 public void setSecurityInspectionDate(Date securityInspectionDate) {
51 this.securityInspectionDate = securityInspectionDate; 59 this.securityInspectionDate = securityInspectionDate;
52 } 60 }
@@ -99,6 +107,14 @@ public class StaffSecurityInspection { @@ -99,6 +107,14 @@ public class StaffSecurityInspection {
99 this.builders = builders == null ? null : builders.trim(); 107 this.builders = builders == null ? null : builders.trim();
100 } 108 }
101 109
  110 + public String getOtherSituations() {
  111 + return otherSituations;
  112 + }
  113 +
  114 + public void setOtherSituations(String otherSituations) {
  115 + this.otherSituations = otherSituations == null ? null : otherSituations.trim();
  116 + }
  117 +
102 public Integer getUserId() { 118 public Integer getUserId() {
103 return userId; 119 return userId;
104 } 120 }
@@ -64,6 +64,8 @@ public class MyAuthenticationSuccessHandler extends SavedRequestAwareAuthenticat @@ -64,6 +64,8 @@ public class MyAuthenticationSuccessHandler extends SavedRequestAwareAuthenticat
64 USERS loginedUser = new USERS(); 64 USERS loginedUser = new USERS();
65 loginedUser.setUsername(user.getUsername()); 65 loginedUser.setUsername(user.getUsername());
66 loginedUser.setUserface(user.getUserface()); 66 loginedUser.setUserface(user.getUserface());
  67 + loginedUser.setUserId(user.getUserId());
  68 + loginedUser.setRealname(user.getRealname());
67 69
68 70
69 //设置用户的TOKEN的有效时间,时间配置在配置文件中设置 71 //设置用户的TOKEN的有效时间,时间配置在配置文件中设置
  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.StaffApartmentSpareKeyMapper;
  7 +import com.tianbo.warehouse.dao.StaffSecurityInspectionMapper;
  8 +import com.tianbo.warehouse.model.StaffApartmentSpareKey;
  9 +import com.tianbo.warehouse.model.StaffSecurityInspection;
  10 +import com.tianbo.warehouse.service.satff.KeyService;
  11 +import com.tianbo.warehouse.service.satff.StaffSecurityInspectionService;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Service;
  14 +
  15 +import java.util.Date;
  16 +import java.util.List;
  17 +import java.util.UUID;
  18 +
  19 +@Service
  20 +public class KeyServiceImp implements KeyService {
  21 +
  22 + @Autowired
  23 + StaffApartmentSpareKeyMapper staffApartmentSpareKeyMapper;
  24 +
  25 + @Override
  26 + public PageInfo<StaffApartmentSpareKey> findAll(int pageNum, int pageSize, String staffname) {
  27 + Page<StaffApartmentSpareKey> page = PageHelper.startPage(pageNum,pageSize);
  28 + List<StaffApartmentSpareKey> list = staffApartmentSpareKeyMapper.findAll(staffname);
  29 + PageInfo<StaffApartmentSpareKey> result = new PageInfo<>(list);
  30 + return result;
  31 + }
  32 +
  33 + @Override
  34 + public int insertSelective(StaffApartmentSpareKey staffApartmentSpareKey) {
  35 + staffApartmentSpareKey.setId(UUID.randomUUID().toString());
  36 + staffApartmentSpareKey.setCreatetime(new Date());
  37 + return staffApartmentSpareKeyMapper.insertSelective(staffApartmentSpareKey);
  38 + }
  39 +
  40 + @Override
  41 + public int updateByPrimaryKeySelective(StaffApartmentSpareKey staffApartmentSpareKey) {
  42 + staffApartmentSpareKey.setCreatetime(new Date());
  43 + return staffApartmentSpareKeyMapper.updateByPrimaryKeySelective(staffApartmentSpareKey);
  44 + }
  45 +
  46 + @Override
  47 + public int deleteByPrimaryKey(String securityInspectionId) {
  48 + if (securityInspectionId.contains(",")){
  49 + try {
  50 + String a = "";
  51 + String[] split = securityInspectionId.split(",");
  52 + for (int i=0; i<split.length; i++){
  53 + staffApartmentSpareKeyMapper.deleteByPrimaryKey(split[i]);
  54 + }
  55 + System.out.println();
  56 + return 1;
  57 + }catch (Exception e){
  58 + e.printStackTrace();
  59 + return 0;
  60 + }
  61 + }else {
  62 + return staffApartmentSpareKeyMapper.deleteByPrimaryKey(securityInspectionId);
  63 + }
  64 + }
  65 +}
  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.StaffApartmentMaintainMapper;
  7 +import com.tianbo.warehouse.dao.StaffApartmentSpareKeyMapper;
  8 +import com.tianbo.warehouse.model.StaffApartmentMaintain;
  9 +import com.tianbo.warehouse.model.StaffApartmentSpareKey;
  10 +import com.tianbo.warehouse.service.satff.KeyService;
  11 +import com.tianbo.warehouse.service.satff.MaintainService;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Service;
  14 +
  15 +import java.util.Date;
  16 +import java.util.List;
  17 +import java.util.UUID;
  18 +
  19 +@Service
  20 +public class MaintainServiceImp implements MaintainService {
  21 +
  22 + @Autowired
  23 + StaffApartmentMaintainMapper staffApartmentMaintainMapper;
  24 +
  25 + @Override
  26 + public PageInfo<StaffApartmentMaintain> findAll(int pageNum, int pageSize, String staffname) {
  27 + Page<StaffApartmentMaintain> page = PageHelper.startPage(pageNum,pageSize);
  28 + List<StaffApartmentMaintain> list = staffApartmentMaintainMapper.findAll(staffname);
  29 + PageInfo<StaffApartmentMaintain> result = new PageInfo<>(list);
  30 + return result;
  31 + }
  32 +
  33 + @Override
  34 + public int insertSelective(StaffApartmentMaintain staffApartmentMaintain) {
  35 + staffApartmentMaintain.setId(UUID.randomUUID().toString());
  36 + staffApartmentMaintain.setCreatetime(new Date());
  37 + return staffApartmentMaintainMapper.insertSelective(staffApartmentMaintain);
  38 + }
  39 +
  40 + @Override
  41 + public int updateByPrimaryKeySelective(StaffApartmentMaintain staffApartmentMaintain) {
  42 + staffApartmentMaintain.setCreatetime(new Date());
  43 + return staffApartmentMaintainMapper.updateByPrimaryKeySelective(staffApartmentMaintain);
  44 + }
  45 +
  46 + @Override
  47 + public int deleteByPrimaryKey(String securityInspectionId) {
  48 + if (securityInspectionId.contains(",")){
  49 + try {
  50 + String a = "";
  51 + String[] split = securityInspectionId.split(",");
  52 + for (int i=0; i<split.length; i++){
  53 + staffApartmentMaintainMapper.deleteByPrimaryKey(split[i]);
  54 + }
  55 + System.out.println();
  56 + return 1;
  57 + }catch (Exception e){
  58 + e.printStackTrace();
  59 + return 0;
  60 + }
  61 + }else {
  62 + return staffApartmentMaintainMapper.deleteByPrimaryKey(securityInspectionId);
  63 + }
  64 + }
  65 +}
@@ -25,10 +25,9 @@ public class StaffSecurityInspectionServiceImp implements StaffSecurityInspectio @@ -25,10 +25,9 @@ public class StaffSecurityInspectionServiceImp implements StaffSecurityInspectio
25 StaffSecurityInspectionMapper staffSecurityInspectionMapper; 25 StaffSecurityInspectionMapper staffSecurityInspectionMapper;
26 26
27 @Override 27 @Override
28 - public PageInfo<StaffSecurityInspection> findAll(int pageNum, int pageSize) { 28 + public PageInfo<StaffSecurityInspection> findAll(int pageNum, int pageSize, String securityInspectionName) {
29 Page<StaffSecurityInspection> page = PageHelper.startPage(pageNum,pageSize); 29 Page<StaffSecurityInspection> page = PageHelper.startPage(pageNum,pageSize);
30 - List<StaffSecurityInspection> list = staffSecurityInspectionMapper.findAll();  
31 - 30 + List<StaffSecurityInspection> list = staffSecurityInspectionMapper.findAll(securityInspectionName);
32 PageInfo<StaffSecurityInspection> result = new PageInfo<>(list); 31 PageInfo<StaffSecurityInspection> result = new PageInfo<>(list);
33 return result; 32 return result;
34 } 33 }
@@ -37,6 +36,7 @@ public class StaffSecurityInspectionServiceImp implements StaffSecurityInspectio @@ -37,6 +36,7 @@ public class StaffSecurityInspectionServiceImp implements StaffSecurityInspectio
37 public int insertSelective(StaffSecurityInspection staffSecurityInspection) { 36 public int insertSelective(StaffSecurityInspection staffSecurityInspection) {
38 staffSecurityInspection.setSecurityInspectionId(UUID.randomUUID().toString()); 37 staffSecurityInspection.setSecurityInspectionId(UUID.randomUUID().toString());
39 staffSecurityInspection.setOptTime(new Date()); 38 staffSecurityInspection.setOptTime(new Date());
  39 + staffSecurityInspection.setRealname(staffSecurityInspection.getSecurityInspectionName());
40 return staffSecurityInspectionMapper.insertSelective(staffSecurityInspection); 40 return staffSecurityInspectionMapper.insertSelective(staffSecurityInspection);
41 } 41 }
42 42
  1 +package com.tianbo.warehouse.service.satff;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.tianbo.warehouse.model.StaffApartmentSpareKey;
  5 +
  6 +public interface KeyService {
  7 +
  8 + PageInfo<StaffApartmentSpareKey> findAll(int pageNum, int pageSize, String staffname);
  9 +
  10 + int insertSelective(StaffApartmentSpareKey staffApartmentSpareKey);
  11 +
  12 + int updateByPrimaryKeySelective(StaffApartmentSpareKey staffApartmentSpareKey);
  13 +
  14 + int deleteByPrimaryKey(String id);
  15 +
  16 +}
  1 +package com.tianbo.warehouse.service.satff;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.tianbo.warehouse.model.StaffApartmentMaintain;
  5 +import com.tianbo.warehouse.model.StaffApartmentSpareKey;
  6 +
  7 +public interface MaintainService {
  8 +
  9 + PageInfo<StaffApartmentMaintain> findAll(int pageNum, int pageSize, String staffname);
  10 +
  11 + int insertSelective(StaffApartmentMaintain staffApartmentMaintain);
  12 +
  13 + int updateByPrimaryKeySelective(StaffApartmentMaintain staffApartmentMaintain);
  14 +
  15 + int deleteByPrimaryKey(String id);
  16 +
  17 +
  18 +}
@@ -6,7 +6,7 @@ import com.tianbo.warehouse.model.StaffSecurityInspection; @@ -6,7 +6,7 @@ import com.tianbo.warehouse.model.StaffSecurityInspection;
6 6
7 public interface StaffSecurityInspectionService { 7 public interface StaffSecurityInspectionService {
8 8
9 - PageInfo<StaffSecurityInspection> findAll(int pageNum, int pageSize); 9 + PageInfo<StaffSecurityInspection> findAll(int pageNum, int pageSize, String securityInspectionName);
10 10
11 int insertSelective(StaffSecurityInspection staffSecurityInspection); 11 int insertSelective(StaffSecurityInspection staffSecurityInspection);
12 12
@@ -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 != '' companyName != null"> 25 + <if test="companyName != '' and 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
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 <result column="role_sign" property="roleSign" jdbcType="VARCHAR" /> 7 <result column="role_sign" property="roleSign" jdbcType="VARCHAR" />
8 <result column="description" property="description" jdbcType="VARCHAR" /> 8 <result column="description" property="description" jdbcType="VARCHAR" />
9 <result column="department_id" property="departmentId" jdbcType="VARCHAR" /> 9 <result column="department_id" property="departmentId" jdbcType="VARCHAR" />
  10 + <collection property="permissions" ofType="com.tianbo.warehouse.model.PERMISSION" javaType="java.util.ArrayList" select="com.tianbo.warehouse.dao.PERMISSIONMapper.getRolePermisson" column="role_id"></collection>
10 </resultMap> 11 </resultMap>
11 <sql id="Base_Column_List" > 12 <sql id="Base_Column_List" >
12 role_id, role_name, role_sign, description, department_id 13 role_id, role_name, role_sign, description, department_id
@@ -29,11 +29,13 @@ @@ -29,11 +29,13 @@
29 values (#{id,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER} 29 values (#{id,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER}
30 ) 30 )
31 </insert> 31 </insert>
32 - <insert id="insertRolePerm" parameterType="RolePermission"> 32 + <insert id="insertRolePerm" parameterType="com.tianbo.warehouse.model.RolePermission">
33 insert into role_permission(role_id, permission_id) 33 insert into role_permission(role_id, permission_id)
34 values 34 values
35 <foreach collection="permissionIds" item="rolePem" index="index" separator=","> 35 <foreach collection="permissionIds" item="rolePem" index="index" separator=",">
36 - (#{roleId,jdbcType=INTEGER},#{rolePem,jdbcType=INTEGER}) 36 + <if test="rolePem !=null">
  37 + (#{roleId,jdbcType=INTEGER},#{rolePem,jdbcType=INTEGER})
  38 + </if>
37 </foreach> 39 </foreach>
38 </insert> 40 </insert>
39 <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.RolePermission" > 41 <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.RolePermission" >
  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.StaffApartmentMaintainMapper" >
  4 + <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.StaffApartmentMaintain" >
  5 + <id column="id" property="id" jdbcType="VARCHAR" />
  6 + <result column="repairsDate" property="repairsdate" jdbcType="TIMESTAMP" />
  7 + <result column="repairsContent" property="repairscontent" jdbcType="VARCHAR" />
  8 + <result column="reflectWay" property="reflectway" jdbcType="VARCHAR" />
  9 + <result column="repairsDept" property="repairsdept" jdbcType="VARCHAR" />
  10 + <result column="answerThePhoneName" property="answerthephonename" jdbcType="VARCHAR" />
  11 + <result column="repairsName" property="repairsname" jdbcType="VARCHAR" />
  12 + <result column="repairsPhone" property="repairsphone" jdbcType="VARCHAR" />
  13 + <result column="maintainDate" property="maintaindate" jdbcType="TIMESTAMP" />
  14 + <result column="maintainCase" property="maintaincase" jdbcType="VARCHAR" />
  15 + <result column="cooperateMaintainName" property="cooperatemaintainname" jdbcType="VARCHAR" />
  16 + <result column="meno" property="meno" jdbcType="INTEGER" />
  17 + <result column="remark1" property="remark1" jdbcType="VARCHAR" />
  18 + <result column="remark2" property="remark2" jdbcType="VARCHAR" />
  19 + <result column="remark3" property="remark3" jdbcType="VARCHAR" />
  20 + <result column="createBy" property="createby" jdbcType="INTEGER" />
  21 + <result column="createTime" property="createtime" jdbcType="TIMESTAMP" />
  22 + </resultMap>
  23 + <sql id="Base_Column_List" >
  24 + id, repairsDate, repairsContent, reflectWay, repairsDept, answerThePhoneName, repairsName,
  25 + repairsPhone, maintainDate, maintainCase, cooperateMaintainName, meno, remark1, remark2,
  26 + remark3, createBy, createTime
  27 + </sql>
  28 + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  29 + select
  30 + <include refid="Base_Column_List" />
  31 + from staff_apertment_maintain
  32 + where id = #{id,jdbcType=VARCHAR}
  33 + </select>
  34 +
  35 + <select id="findAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
  36 + select
  37 + <include refid="Base_Column_List" />
  38 + from staff_apertment_maintain
  39 + <if test="repairsname != null and repairsname!=''" >
  40 + where repairsName = #{repairsname, jdbcType=VARCHAR}
  41 + </if>
  42 + </select>
  43 +
  44 + <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  45 + delete from staff_apertment_maintain
  46 + where id = #{id,jdbcType=VARCHAR}
  47 + </delete>
  48 + <insert id="insert" parameterType="com.tianbo.warehouse.model.StaffApartmentMaintain" >
  49 + insert into staff_apertment_maintain (id, repairsDate, repairsContent,
  50 + reflectWay, repairsDept, answerThePhoneName,
  51 + repairsName, repairsPhone, maintainDate,
  52 + maintainCase, cooperateMaintainName, meno,
  53 + remark1, remark2, remark3,
  54 + createBy, createTime)
  55 + values (#{id,jdbcType=VARCHAR}, #{repairsdate,jdbcType=TIMESTAMP}, #{repairscontent,jdbcType=VARCHAR},
  56 + #{reflectway,jdbcType=VARCHAR}, #{repairsdept,jdbcType=VARCHAR}, #{answerthephonename,jdbcType=VARCHAR},
  57 + #{repairsname,jdbcType=VARCHAR}, #{repairsphone,jdbcType=VARCHAR}, #{maintaindate,jdbcType=TIMESTAMP},
  58 + #{maintaincase,jdbcType=VARCHAR}, #{cooperatemaintainname,jdbcType=VARCHAR}, #{meno,jdbcType=INTEGER},
  59 + #{remark1,jdbcType=VARCHAR}, #{remark2,jdbcType=VARCHAR}, #{remark3,jdbcType=VARCHAR},
  60 + #{createby,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP})
  61 + </insert>
  62 + <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffApartmentMaintain" >
  63 + insert into staff_apertment_maintain
  64 + <trim prefix="(" suffix=")" suffixOverrides="," >
  65 + <if test="id != null" >
  66 + id,
  67 + </if>
  68 + <if test="repairsdate != null" >
  69 + repairsDate,
  70 + </if>
  71 + <if test="repairscontent != null" >
  72 + repairsContent,
  73 + </if>
  74 + <if test="reflectway != null" >
  75 + reflectWay,
  76 + </if>
  77 + <if test="repairsdept != null" >
  78 + repairsDept,
  79 + </if>
  80 + <if test="answerthephonename != null" >
  81 + answerThePhoneName,
  82 + </if>
  83 + <if test="repairsname != null" >
  84 + repairsName,
  85 + </if>
  86 + <if test="repairsphone != null" >
  87 + repairsPhone,
  88 + </if>
  89 + <if test="maintaindate != null" >
  90 + maintainDate,
  91 + </if>
  92 + <if test="maintaincase != null" >
  93 + maintainCase,
  94 + </if>
  95 + <if test="cooperatemaintainname != null" >
  96 + cooperateMaintainName,
  97 + </if>
  98 + <if test="meno != null" >
  99 + meno,
  100 + </if>
  101 + <if test="remark1 != null" >
  102 + remark1,
  103 + </if>
  104 + <if test="remark2 != null" >
  105 + remark2,
  106 + </if>
  107 + <if test="remark3 != null" >
  108 + remark3,
  109 + </if>
  110 + <if test="createby != null" >
  111 + createBy,
  112 + </if>
  113 + <if test="createtime != null" >
  114 + createTime,
  115 + </if>
  116 + </trim>
  117 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  118 + <if test="id != null" >
  119 + #{id,jdbcType=VARCHAR},
  120 + </if>
  121 + <if test="repairsdate != null" >
  122 + #{repairsdate,jdbcType=TIMESTAMP},
  123 + </if>
  124 + <if test="repairscontent != null" >
  125 + #{repairscontent,jdbcType=VARCHAR},
  126 + </if>
  127 + <if test="reflectway != null" >
  128 + #{reflectway,jdbcType=VARCHAR},
  129 + </if>
  130 + <if test="repairsdept != null" >
  131 + #{repairsdept,jdbcType=VARCHAR},
  132 + </if>
  133 + <if test="answerthephonename != null" >
  134 + #{answerthephonename,jdbcType=VARCHAR},
  135 + </if>
  136 + <if test="repairsname != null" >
  137 + #{repairsname,jdbcType=VARCHAR},
  138 + </if>
  139 + <if test="repairsphone != null" >
  140 + #{repairsphone,jdbcType=VARCHAR},
  141 + </if>
  142 + <if test="maintaindate != null" >
  143 + #{maintaindate,jdbcType=TIMESTAMP},
  144 + </if>
  145 + <if test="maintaincase != null" >
  146 + #{maintaincase,jdbcType=VARCHAR},
  147 + </if>
  148 + <if test="cooperatemaintainname != null" >
  149 + #{cooperatemaintainname,jdbcType=VARCHAR},
  150 + </if>
  151 + <if test="meno != null" >
  152 + #{meno,jdbcType=INTEGER},
  153 + </if>
  154 + <if test="remark1 != null" >
  155 + #{remark1,jdbcType=VARCHAR},
  156 + </if>
  157 + <if test="remark2 != null" >
  158 + #{remark2,jdbcType=VARCHAR},
  159 + </if>
  160 + <if test="remark3 != null" >
  161 + #{remark3,jdbcType=VARCHAR},
  162 + </if>
  163 + <if test="createby != null" >
  164 + #{createby,jdbcType=INTEGER},
  165 + </if>
  166 + <if test="createtime != null" >
  167 + #{createtime,jdbcType=TIMESTAMP},
  168 + </if>
  169 + </trim>
  170 + </insert>
  171 + <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.StaffApartmentMaintain" >
  172 + update staff_apertment_maintain
  173 + <set >
  174 + <if test="repairsdate != null" >
  175 + repairsDate = #{repairsdate,jdbcType=TIMESTAMP},
  176 + </if>
  177 + <if test="repairscontent != null" >
  178 + repairsContent = #{repairscontent,jdbcType=VARCHAR},
  179 + </if>
  180 + <if test="reflectway != null" >
  181 + reflectWay = #{reflectway,jdbcType=VARCHAR},
  182 + </if>
  183 + <if test="repairsdept != null" >
  184 + repairsDept = #{repairsdept,jdbcType=VARCHAR},
  185 + </if>
  186 + <if test="answerthephonename != null" >
  187 + answerThePhoneName = #{answerthephonename,jdbcType=VARCHAR},
  188 + </if>
  189 + <if test="repairsname != null" >
  190 + repairsName = #{repairsname,jdbcType=VARCHAR},
  191 + </if>
  192 + <if test="repairsphone != null" >
  193 + repairsPhone = #{repairsphone,jdbcType=VARCHAR},
  194 + </if>
  195 + <if test="maintaindate != null" >
  196 + maintainDate = #{maintaindate,jdbcType=TIMESTAMP},
  197 + </if>
  198 + <if test="maintaincase != null" >
  199 + maintainCase = #{maintaincase,jdbcType=VARCHAR},
  200 + </if>
  201 + <if test="cooperatemaintainname != null" >
  202 + cooperateMaintainName = #{cooperatemaintainname,jdbcType=VARCHAR},
  203 + </if>
  204 + <if test="meno != null" >
  205 + meno = #{meno,jdbcType=INTEGER},
  206 + </if>
  207 + <if test="remark1 != null" >
  208 + remark1 = #{remark1,jdbcType=VARCHAR},
  209 + </if>
  210 + <if test="remark2 != null" >
  211 + remark2 = #{remark2,jdbcType=VARCHAR},
  212 + </if>
  213 + <if test="remark3 != null" >
  214 + remark3 = #{remark3,jdbcType=VARCHAR},
  215 + </if>
  216 + <if test="createby != null" >
  217 + createBy = #{createby,jdbcType=INTEGER},
  218 + </if>
  219 + <if test="createtime != null" >
  220 + createTime = #{createtime,jdbcType=TIMESTAMP},
  221 + </if>
  222 + </set>
  223 + where id = #{id,jdbcType=VARCHAR}
  224 + </update>
  225 + <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.StaffApartmentMaintain" >
  226 + update staff_apertment_maintain
  227 + set repairsDate = #{repairsdate,jdbcType=TIMESTAMP},
  228 + repairsContent = #{repairscontent,jdbcType=VARCHAR},
  229 + reflectWay = #{reflectway,jdbcType=VARCHAR},
  230 + repairsDept = #{repairsdept,jdbcType=VARCHAR},
  231 + answerThePhoneName = #{answerthephonename,jdbcType=VARCHAR},
  232 + repairsName = #{repairsname,jdbcType=VARCHAR},
  233 + repairsPhone = #{repairsphone,jdbcType=VARCHAR},
  234 + maintainDate = #{maintaindate,jdbcType=TIMESTAMP},
  235 + maintainCase = #{maintaincase,jdbcType=VARCHAR},
  236 + cooperateMaintainName = #{cooperatemaintainname,jdbcType=VARCHAR},
  237 + meno = #{meno,jdbcType=INTEGER},
  238 + remark1 = #{remark1,jdbcType=VARCHAR},
  239 + remark2 = #{remark2,jdbcType=VARCHAR},
  240 + remark3 = #{remark3,jdbcType=VARCHAR},
  241 + createBy = #{createby,jdbcType=INTEGER},
  242 + createTime = #{createtime,jdbcType=TIMESTAMP}
  243 + where id = #{id,jdbcType=VARCHAR}
  244 + </update>
  245 +</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.StaffApartmentSpareKeyMapper" >
  4 + <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.StaffApartmentSpareKey" >
  5 + <id column="id" property="id" jdbcType="VARCHAR" />
  6 + <result column="useDate" property="usedate" jdbcType="TIMESTAMP" />
  7 + <result column="roomNum" property="roomnum" jdbcType="VARCHAR" />
  8 + <result column="useTime" property="usetime" jdbcType="TIMESTAMP" />
  9 + <result column="staffName" property="staffname" jdbcType="VARCHAR" />
  10 + <result column="dept" property="dept" jdbcType="VARCHAR" />
  11 + <result column="phone" property="phone" jdbcType="VARCHAR" />
  12 + <result column="icType" property="ictype" jdbcType="VARCHAR" />
  13 + <result column="icCard" property="iccard" jdbcType="VARCHAR" />
  14 + <result column="roomDuty" property="roomduty" jdbcType="VARCHAR" />
  15 + <result column="remark1" property="remark1" jdbcType="VARCHAR" />
  16 + <result column="remark2" property="remark2" jdbcType="VARCHAR" />
  17 + <result column="remark3" property="remark3" jdbcType="VARCHAR" />
  18 + <result column="createBy" property="createby" jdbcType="INTEGER" />
  19 + <result column="createTime" property="createtime" jdbcType="TIMESTAMP" />
  20 + </resultMap>
  21 + <sql id="Base_Column_List" >
  22 + id, useDate, roomNum, useTime, staffName, dept, phone, icType, icCard, roomDuty,
  23 + remark1, remark2, remark3, createBy, createTime
  24 + </sql>
  25 + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  26 + select
  27 + <include refid="Base_Column_List" />
  28 + from staff_apartment_spare_key
  29 + where id = #{id,jdbcType=VARCHAR}
  30 + </select>
  31 +
  32 + <select id="findAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
  33 + select
  34 + <include refid="Base_Column_List" />
  35 + from staff_apartment_spare_key
  36 + <if test="staffname != null and staffname!=''" >
  37 + where staffname = #{staffname, jdbcType=VARCHAR}
  38 + </if>
  39 + </select>
  40 +
  41 + <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  42 + delete from staff_apartment_spare_key
  43 + where id = #{id,jdbcType=VARCHAR}
  44 + </delete>
  45 + <insert id="insert" parameterType="com.tianbo.warehouse.model.StaffApartmentSpareKey" >
  46 + insert into staff_apartment_spare_key (id, useDate, roomNum,
  47 + useTime, staffName, dept,
  48 + phone, icType, icCard,
  49 + roomDuty, remark1, remark2,
  50 + remark3, createBy, createTime
  51 + )
  52 + values (#{id,jdbcType=VARCHAR}, #{usedate,jdbcType=TIMESTAMP}, #{roomnum,jdbcType=VARCHAR},
  53 + #{usetime,jdbcType=TIMESTAMP}, #{staffname,jdbcType=VARCHAR}, #{dept,jdbcType=VARCHAR},
  54 + #{phone,jdbcType=VARCHAR}, #{ictype,jdbcType=VARCHAR}, #{iccard,jdbcType=VARCHAR},
  55 + #{roomduty,jdbcType=VARCHAR}, #{remark1,jdbcType=VARCHAR}, #{remark2,jdbcType=VARCHAR},
  56 + #{remark3,jdbcType=VARCHAR}, #{createby,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}
  57 + )
  58 + </insert>
  59 + <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffApartmentSpareKey" >
  60 + insert into staff_apartment_spare_key
  61 + <trim prefix="(" suffix=")" suffixOverrides="," >
  62 + <if test="id != null" >
  63 + id,
  64 + </if>
  65 + <if test="usedate != null" >
  66 + useDate,
  67 + </if>
  68 + <if test="roomnum != null" >
  69 + roomNum,
  70 + </if>
  71 + <if test="usetime != null" >
  72 + useTime,
  73 + </if>
  74 + <if test="staffname != null" >
  75 + staffName,
  76 + </if>
  77 + <if test="dept != null" >
  78 + dept,
  79 + </if>
  80 + <if test="phone != null" >
  81 + phone,
  82 + </if>
  83 + <if test="ictype != null" >
  84 + icType,
  85 + </if>
  86 + <if test="iccard != null" >
  87 + icCard,
  88 + </if>
  89 + <if test="roomduty != null" >
  90 + roomDuty,
  91 + </if>
  92 + <if test="remark1 != null" >
  93 + remark1,
  94 + </if>
  95 + <if test="remark2 != null" >
  96 + remark2,
  97 + </if>
  98 + <if test="remark3 != null" >
  99 + remark3,
  100 + </if>
  101 + <if test="createby != null" >
  102 + createBy,
  103 + </if>
  104 + <if test="createtime != null" >
  105 + createTime,
  106 + </if>
  107 + </trim>
  108 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  109 + <if test="id != null" >
  110 + #{id,jdbcType=VARCHAR},
  111 + </if>
  112 + <if test="usedate != null" >
  113 + #{usedate,jdbcType=TIMESTAMP},
  114 + </if>
  115 + <if test="roomnum != null" >
  116 + #{roomnum,jdbcType=VARCHAR},
  117 + </if>
  118 + <if test="usetime != null" >
  119 + #{usetime,jdbcType=TIMESTAMP},
  120 + </if>
  121 + <if test="staffname != null" >
  122 + #{staffname,jdbcType=VARCHAR},
  123 + </if>
  124 + <if test="dept != null" >
  125 + #{dept,jdbcType=VARCHAR},
  126 + </if>
  127 + <if test="phone != null" >
  128 + #{phone,jdbcType=VARCHAR},
  129 + </if>
  130 + <if test="ictype != null" >
  131 + #{ictype,jdbcType=VARCHAR},
  132 + </if>
  133 + <if test="iccard != null" >
  134 + #{iccard,jdbcType=VARCHAR},
  135 + </if>
  136 + <if test="roomduty != null" >
  137 + #{roomduty,jdbcType=VARCHAR},
  138 + </if>
  139 + <if test="remark1 != null" >
  140 + #{remark1,jdbcType=VARCHAR},
  141 + </if>
  142 + <if test="remark2 != null" >
  143 + #{remark2,jdbcType=VARCHAR},
  144 + </if>
  145 + <if test="remark3 != null" >
  146 + #{remark3,jdbcType=VARCHAR},
  147 + </if>
  148 + <if test="createby != null" >
  149 + #{createby,jdbcType=INTEGER},
  150 + </if>
  151 + <if test="createtime != null" >
  152 + #{createtime,jdbcType=TIMESTAMP},
  153 + </if>
  154 + </trim>
  155 + </insert>
  156 + <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.StaffApartmentSpareKey" >
  157 + update staff_apartment_spare_key
  158 + <set >
  159 + <if test="usedate != null" >
  160 + useDate = #{usedate,jdbcType=TIMESTAMP},
  161 + </if>
  162 + <if test="roomnum != null" >
  163 + roomNum = #{roomnum,jdbcType=VARCHAR},
  164 + </if>
  165 + <if test="usetime != null" >
  166 + useTime = #{usetime,jdbcType=TIMESTAMP},
  167 + </if>
  168 + <if test="staffname != null" >
  169 + staffName = #{staffname,jdbcType=VARCHAR},
  170 + </if>
  171 + <if test="dept != null" >
  172 + dept = #{dept,jdbcType=VARCHAR},
  173 + </if>
  174 + <if test="phone != null" >
  175 + phone = #{phone,jdbcType=VARCHAR},
  176 + </if>
  177 + <if test="ictype != null" >
  178 + icType = #{ictype,jdbcType=VARCHAR},
  179 + </if>
  180 + <if test="iccard != null" >
  181 + icCard = #{iccard,jdbcType=VARCHAR},
  182 + </if>
  183 + <if test="roomduty != null" >
  184 + roomDuty = #{roomduty,jdbcType=VARCHAR},
  185 + </if>
  186 + <if test="remark1 != null" >
  187 + remark1 = #{remark1,jdbcType=VARCHAR},
  188 + </if>
  189 + <if test="remark2 != null" >
  190 + remark2 = #{remark2,jdbcType=VARCHAR},
  191 + </if>
  192 + <if test="remark3 != null" >
  193 + remark3 = #{remark3,jdbcType=VARCHAR},
  194 + </if>
  195 + <if test="createby != null" >
  196 + createBy = #{createby,jdbcType=INTEGER},
  197 + </if>
  198 + <if test="createtime != null" >
  199 + createTime = #{createtime,jdbcType=TIMESTAMP},
  200 + </if>
  201 + </set>
  202 + where id = #{id,jdbcType=VARCHAR}
  203 + </update>
  204 + <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.StaffApartmentSpareKey" >
  205 + update staff_apartment_spare_key
  206 + set useDate = #{usedate,jdbcType=TIMESTAMP},
  207 + roomNum = #{roomnum,jdbcType=VARCHAR},
  208 + useTime = #{usetime,jdbcType=TIMESTAMP},
  209 + staffName = #{staffname,jdbcType=VARCHAR},
  210 + dept = #{dept,jdbcType=VARCHAR},
  211 + phone = #{phone,jdbcType=VARCHAR},
  212 + icType = #{ictype,jdbcType=VARCHAR},
  213 + icCard = #{iccard,jdbcType=VARCHAR},
  214 + roomDuty = #{roomduty,jdbcType=VARCHAR},
  215 + remark1 = #{remark1,jdbcType=VARCHAR},
  216 + remark2 = #{remark2,jdbcType=VARCHAR},
  217 + remark3 = #{remark3,jdbcType=VARCHAR},
  218 + createBy = #{createby,jdbcType=INTEGER},
  219 + createTime = #{createtime,jdbcType=TIMESTAMP}
  220 + where id = #{id,jdbcType=VARCHAR}
  221 + </update>
  222 +</mapper>
@@ -11,14 +11,15 @@ @@ -11,14 +11,15 @@
11 <result column="doubtful_person" property="doubtfulPerson" jdbcType="VARCHAR" /> 11 <result column="doubtful_person" property="doubtfulPerson" jdbcType="VARCHAR" />
12 <result column="violations_car" property="violationsCar" jdbcType="VARCHAR" /> 12 <result column="violations_car" property="violationsCar" jdbcType="VARCHAR" />
13 <result column="builders" property="builders" jdbcType="VARCHAR" /> 13 <result column="builders" property="builders" jdbcType="VARCHAR" />
  14 + <result column="other_situations" property="otherSituations" jdbcType="VARCHAR" />
14 <result column="user_id" property="userId" jdbcType="INTEGER" /> 15 <result column="user_id" property="userId" jdbcType="INTEGER" />
15 <result column="realname" property="realname" jdbcType="VARCHAR" /> 16 <result column="realname" property="realname" jdbcType="VARCHAR" />
16 <result column="opt_time" property="optTime" jdbcType="TIMESTAMP" /> 17 <result column="opt_time" property="optTime" jdbcType="TIMESTAMP" />
17 </resultMap> 18 </resultMap>
18 <sql id="Base_Column_List" > 19 <sql id="Base_Column_List" >
19 security_inspection_id, security_inspection_name, security_inspection_date, fire_name, 20 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 21 + security_electro, fireproofing, doubtful_person, violations_car, builders, other_situations,
  22 + user_id, realname, opt_time
22 </sql> 23 </sql>
23 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > 24 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
24 select 25 select
@@ -31,7 +32,9 @@ @@ -31,7 +32,9 @@
31 select 32 select
32 <include refid="Base_Column_List" /> 33 <include refid="Base_Column_List" />
33 from staff_security_inspection 34 from staff_security_inspection
34 - ORDER BY opt_time 35 + <if test="securityInspectionName != null and securityInspectionName!=''" >
  36 + where security_inspection_name = #{securityInspectionName, jdbcType=VARCHAR}
  37 + </if>
35 </select> 38 </select>
36 39
37 <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > 40 <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
@@ -42,13 +45,13 @@ @@ -42,13 +45,13 @@
42 insert into staff_security_inspection (security_inspection_id, security_inspection_name, 45 insert into staff_security_inspection (security_inspection_id, security_inspection_name,
43 security_inspection_date, fire_name, security_electro, 46 security_inspection_date, fire_name, security_electro,
44 fireproofing, doubtful_person, violations_car, 47 fireproofing, doubtful_person, violations_car,
45 - builders, user_id, realname,  
46 - opt_time) 48 + builders, other_situations, user_id,
  49 + realname, opt_time)
47 values (#{securityInspectionId,jdbcType=VARCHAR}, #{securityInspectionName,jdbcType=VARCHAR}, 50 values (#{securityInspectionId,jdbcType=VARCHAR}, #{securityInspectionName,jdbcType=VARCHAR},
48 #{securityInspectionDate,jdbcType=TIMESTAMP}, #{fireName,jdbcType=VARCHAR}, #{securityElectro,jdbcType=VARCHAR}, 51 #{securityInspectionDate,jdbcType=TIMESTAMP}, #{fireName,jdbcType=VARCHAR}, #{securityElectro,jdbcType=VARCHAR},
49 #{fireproofing,jdbcType=VARCHAR}, #{doubtfulPerson,jdbcType=VARCHAR}, #{violationsCar,jdbcType=VARCHAR}, 52 #{fireproofing,jdbcType=VARCHAR}, #{doubtfulPerson,jdbcType=VARCHAR}, #{violationsCar,jdbcType=VARCHAR},
50 - #{builders,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{realname,jdbcType=VARCHAR},  
51 - #{optTime,jdbcType=TIMESTAMP}) 53 + #{builders,jdbcType=VARCHAR}, #{otherSituations,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER},
  54 + #{realname,jdbcType=VARCHAR}, #{optTime,jdbcType=TIMESTAMP})
52 </insert> 55 </insert>
53 <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffSecurityInspection" > 56 <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffSecurityInspection" >
54 insert into staff_security_inspection 57 insert into staff_security_inspection
@@ -80,6 +83,9 @@ @@ -80,6 +83,9 @@
80 <if test="builders != null" > 83 <if test="builders != null" >
81 builders, 84 builders,
82 </if> 85 </if>
  86 + <if test="otherSituations != null" >
  87 + other_situations,
  88 + </if>
83 <if test="userId != null" > 89 <if test="userId != null" >
84 user_id, 90 user_id,
85 </if> 91 </if>
@@ -118,6 +124,9 @@ @@ -118,6 +124,9 @@
118 <if test="builders != null" > 124 <if test="builders != null" >
119 #{builders,jdbcType=VARCHAR}, 125 #{builders,jdbcType=VARCHAR},
120 </if> 126 </if>
  127 + <if test="otherSituations != null" >
  128 + #{otherSituations,jdbcType=VARCHAR},
  129 + </if>
121 <if test="userId != null" > 130 <if test="userId != null" >
122 #{userId,jdbcType=INTEGER}, 131 #{userId,jdbcType=INTEGER},
123 </if> 132 </if>
@@ -156,6 +165,9 @@ @@ -156,6 +165,9 @@
156 <if test="builders != null" > 165 <if test="builders != null" >
157 builders = #{builders,jdbcType=VARCHAR}, 166 builders = #{builders,jdbcType=VARCHAR},
158 </if> 167 </if>
  168 + <if test="otherSituations != null" >
  169 + other_situations = #{otherSituations,jdbcType=VARCHAR},
  170 + </if>
159 <if test="userId != null" > 171 <if test="userId != null" >
160 user_id = #{userId,jdbcType=INTEGER}, 172 user_id = #{userId,jdbcType=INTEGER},
161 </if> 173 </if>
@@ -178,6 +190,7 @@ @@ -178,6 +190,7 @@
178 doubtful_person = #{doubtfulPerson,jdbcType=VARCHAR}, 190 doubtful_person = #{doubtfulPerson,jdbcType=VARCHAR},
179 violations_car = #{violationsCar,jdbcType=VARCHAR}, 191 violations_car = #{violationsCar,jdbcType=VARCHAR},
180 builders = #{builders,jdbcType=VARCHAR}, 192 builders = #{builders,jdbcType=VARCHAR},
  193 + other_situations = #{otherSituations,jdbcType=VARCHAR},
181 user_id = #{userId,jdbcType=INTEGER}, 194 user_id = #{userId,jdbcType=INTEGER},
182 realname = #{realname,jdbcType=VARCHAR}, 195 realname = #{realname,jdbcType=VARCHAR},
183 opt_time = #{optTime,jdbcType=TIMESTAMP} 196 opt_time = #{optTime,jdbcType=TIMESTAMP}
1 -package com.tianbo.warehouse;  
2 -  
3 -import com.tianbo.warehouse.imf.handle.IMFSaveHandle;  
4 -  
5 -public class handleTest {  
6 - private static String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Msg> <META> <SNDR>NDLR</SNDR> <RCVR></RCVR> <SEQN>172-33519102</SEQN> <DDTM>20181229124530224</DDTM> <TYPE>HYXX</TYPE> <STYP>NDLR</STYP> </META> <DECLAREPREPAREMASTERXMLBODY> <Head> <MessageID>CN_MT2201_1P0_460470678920X_20181229124530224</MessageID> <FunctionCode>9</FunctionCode> <MessageType>MT2201MASTER</MessageType> <SenderID>460470678920X_DXPENT0000460002_20181229124530224</SenderID> <ReceiverID>4604_20181229124530224</ReceiverID> <SendTime>20181229124530224</SendTime> <Version>1.0</Version> </Head> <Declaration> <Carrier> <ID>CV</ID> </Carrier> <ORG> <ID>CGO</ID> </ORG> <DES> <ID>CDG</ID> </DES> <BorderTransportMeans> <JourneyID>9732/2019-01-01</JourneyID> </BorderTransportMeans> <Consignment> <TransportContractDocument> <ID>172-33519102</ID> </TransportContractDocument> <LoadingLocation> <ID>CGO/4604</ID> <LoadingDate>2018-12-29 12:45</LoadingDate> </LoadingLocation> <UnloadingLocation> <ID>CGO/4604</ID> </UnloadingLocation> <TransportSplitIndicator>0</TransportSplitIndicator> <ConsignmentPackaging> <QuantityQuantity>337</QuantityQuantity> </ConsignmentPackaging> <TotalGrossMassMeasure>3192</TotalGrossMassMeasure> <PreQuantityQuantity>337</PreQuantityQuantity> <PreTotalGrossMassMeasure>3192</PreTotalGrossMassMeasure> <CustomsStatus>001</CustomsStatus> <FreightPayment> <MethodCode>PP</MethodCode> </FreightPayment> <ProductName>IMITATION JEWELRY</ProductName> <PrepareTime>2018-12-29 12:45</PrepareTime> <CustomsCode>4604</CustomsCode> <AgentName>ZRP</AgentName> <AgentCompany>郑州睿鹏物流有限公司</AgentCompany> <NameOfgoods>IMITATION JEWELRY</NameOfgoods> <DeliveryStation>001</DeliveryStation> <UNnumber></UNnumber> <Category></Category> <Consignee> <Name>QUALITAIR SEA INTERNATIONAL</Name> <Address> <Line>4 RUE DU MEUNIER BP 19622 95724 ROISSY CDG</Line> <CityName>CDG</CityName> <CountryCode>FR</CountryCode> <ZipCode></ZipCode> <PROVINCECODE></PROVINCECODE> <PROVINCENAME></PROVINCENAME> <Deltaname></Deltaname> <TelePhone>33 1 34 38 58 13</TelePhone> <Fax></Fax> <CNECUSID>EUROPEAN VAT NUMBER+FR93392293635</CNECUSID> <CNEAEO></CNEAEO> <Unlodingcode>CDG</Unlodingcode> </Address> </Consignee> <Consignor> <name>ON TIME EXPRESS LIMITED</name> <Address> <Line>ROOM 1102 FINANCIAL STREET HAI LUN CENTER NO 440 HAI LUN ROAD</Line> <CountryCode>CN</CountryCode> <ZipCode></ZipCode> <Deltaname></Deltaname> <TelePhone>862163642582</TelePhone> <Fax></Fax> <SHPAEO></SHPAEO> <SHPCUSID>USCI+91310000717852489D</SHPCUSID> </Address> </Consignor> </Consignment> </Declaration> </DECLAREPREPAREMASTERXMLBODY></Msg>";  
7 -  
8 -  
9 -  
10 - public static void main(String[] args) {  
11 -  
12 - IMFSaveHandle handle = new IMFSaveHandle();  
13 - handle.init();  
14 - handle.handle(xml);  
15 -  
16 - }  
17 -  
18 -  
19 -}