Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

Liudijing 11 hónapja
szülő
commit
b19d142741
28 módosított fájl, 686 hozzáadás és 274 törlés
  1. 7 0
      src/main/java/com/hz/employmentsite/controller/baseSettings/SiteInfoController.java
  2. 14 0
      src/main/java/com/hz/employmentsite/controller/baseSettings/UserInfoController.java
  3. 7 1
      src/main/java/com/hz/employmentsite/controller/taskAndLog/DoWorkController.java
  4. 35 15
      src/main/java/com/hz/employmentsite/model/PcDowork.java
  5. 228 98
      src/main/java/com/hz/employmentsite/model/PcDoworkExample.java
  6. 11 2
      src/main/java/com/hz/employmentsite/services/impl/baseSettings/SiteInfoImpl.java
  7. 25 0
      src/main/java/com/hz/employmentsite/services/impl/baseSettings/UserInfoImpl.java
  8. 21 11
      src/main/java/com/hz/employmentsite/services/impl/taskAndLog/DoWorkImpl.java
  9. 4 0
      src/main/java/com/hz/employmentsite/services/service/baseSettings/SiteInfoService.java
  10. 7 0
      src/main/java/com/hz/employmentsite/services/service/baseSettings/UserInfoService.java
  11. 4 0
      src/main/java/com/hz/employmentsite/services/service/taskAndLog/DoWorkService.java
  12. 4 4
      src/main/java/com/hz/employmentsite/vo/baseSettings/InstitutionVo.java
  13. 6 4
      src/main/java/com/hz/employmentsite/vo/baseSettings/SiteInfoVo.java
  14. 4 3
      src/main/java/com/hz/employmentsite/vo/baseSettings/UserInfoVo.java
  15. 7 7
      src/main/java/com/hz/employmentsite/vo/taskAndLog/DoWorkVo.java
  16. 0 1
      src/main/resources/generatorConfig.xml
  17. 69 38
      src/main/resources/mapping/PcDoworkMapper.xml
  18. 0 1
      src/main/resources/mapping/cquery/DoWorkCQuery.xml
  19. 2 2
      src/main/resources/mapping/cquery/UserInfoCQuery.xml
  20. 29 0
      vue/src/api/baseSettings/userInfo.ts
  21. 1 1
      vue/src/api/system/area/index.ts
  22. 15 0
      vue/src/api/taskAndLog/dowork.ts
  23. 55 44
      vue/src/views/baseSettings/institution/edit.vue
  24. 9 20
      vue/src/views/baseSettings/site/edit.vue
  25. 23 4
      vue/src/views/baseSettings/user/edit.vue
  26. 4 2
      vue/src/views/baseSettings/user/index.vue
  27. 71 10
      vue/src/views/taskAndLog/dowork/edit.vue
  28. 24 6
      vue/src/views/taskAndLog/dowork/index.vue

+ 7 - 0
src/main/java/com/hz/employmentsite/controller/baseSettings/SiteInfoController.java

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
 import com.hz.employmentsite.services.service.baseSettings.SiteInfoService;
 import com.hz.employmentsite.services.service.AccountService;
 
+import java.util.List;
 import java.util.UUID;
 
 @RestController
@@ -51,6 +52,7 @@ public class SiteInfoController {
         }else{
             dataModel = siteService.get(siteID);
         }
+        dataModel.manageUsers = null;
         return RespGenerstor.success(dataModel);
     }
 
@@ -61,6 +63,11 @@ public class SiteInfoController {
     }
 
 
+    @ResponseBody
+    @PostMapping("/delete")
+    public BaseResponse<Integer> delete(@RequestBody List<String> idList){
+        return RespGenerstor.success(siteService.delete(idList));
+    }
 
 
 }

+ 14 - 0
src/main/java/com/hz/employmentsite/controller/baseSettings/UserInfoController.java

@@ -3,6 +3,7 @@ package com.hz.employmentsite.controller.baseSettings;
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.filter.exception.BaseResponse;
 import com.hz.employmentsite.filter.exception.RespGenerstor;
+import com.hz.employmentsite.model.SelectProps;
 import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.services.service.baseSettings.UserInfoService;
 import com.hz.employmentsite.util.ExcelHelper;
@@ -10,6 +11,8 @@ import com.hz.employmentsite.vo.baseSettings.UserInfoVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.UUID;
 
 @RestController
@@ -46,11 +49,22 @@ public class UserInfoController {
         return RespGenerstor.success(dataModel);
     }
 
+    @ResponseBody
+    @GetMapping("/getDataList")
+    public BaseResponse<ArrayList<SelectProps>> getDataList() {
+        return RespGenerstor.success(userInfoService.getDataList());
+    }
+
     @PostMapping("save")
     public BaseResponse<Integer> save(@RequestBody UserInfoVo data) {
         return RespGenerstor.success(userInfoService.save(data,accountService.getLoginUserID()));
     }
 
+    @ResponseBody
+    @PostMapping("/delete")
+    public BaseResponse<Integer> delete(@RequestBody List<String> idList){
+        return RespGenerstor.success(userInfoService.delete(idList));
+    }
 
 
 }

+ 7 - 1
src/main/java/com/hz/employmentsite/controller/taskAndLog/DoWorkController.java

@@ -5,11 +5,11 @@ import com.hz.employmentsite.filter.exception.BaseResponse;
 import com.hz.employmentsite.filter.exception.RespGenerstor;
 import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.services.service.taskAndLog.DoWorkService;
-import com.hz.employmentsite.vo.baseSettings.SiteInfoVo;
 import com.hz.employmentsite.vo.taskAndLog.DoWorkVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
 import java.util.UUID;
 
 @RestController
@@ -46,4 +46,10 @@ public class DoWorkController {
     public BaseResponse<Integer> save(@RequestBody DoWorkVo data) {
         return RespGenerstor.success(doWorkService.save(data,accountService.getLoginUserID()));
     }
+
+    @ResponseBody
+    @PostMapping("/delete")
+    public BaseResponse<Integer> delete(@RequestBody List<String> idList){
+        return RespGenerstor.success(doWorkService.delete(idList));
+    }
 }

+ 35 - 15
src/main/java/com/hz/employmentsite/model/PcDowork.java

@@ -5,9 +5,7 @@ import java.util.Date;
 public class PcDowork {
     private String doworkID;
 
-    private String userID;
-
-    private String siteID;
+    private String siteUserID;
 
     private Integer doTypeID;
 
@@ -21,6 +19,12 @@ public class PcDowork {
 
     private Date modifyTime;
 
+    private String regionCode;
+
+    private String streetCode;
+
+    private Date workTime;
+
     public String getDoworkID() {
         return doworkID;
     }
@@ -29,20 +33,12 @@ public class PcDowork {
         this.doworkID = doworkID == null ? null : doworkID.trim();
     }
 
-    public String getUserID() {
-        return userID;
-    }
-
-    public void setUserID(String userID) {
-        this.userID = userID == null ? null : userID.trim();
-    }
-
-    public String getSiteID() {
-        return siteID;
+    public String getSiteUserID() {
+        return siteUserID;
     }
 
-    public void setSiteID(String siteID) {
-        this.siteID = siteID == null ? null : siteID.trim();
+    public void setSiteUserID(String siteUserID) {
+        this.siteUserID = siteUserID == null ? null : siteUserID.trim();
     }
 
     public Integer getDoTypeID() {
@@ -92,4 +88,28 @@ public class PcDowork {
     public void setModifyTime(Date modifyTime) {
         this.modifyTime = modifyTime;
     }
+
+    public String getRegionCode() {
+        return regionCode;
+    }
+
+    public void setRegionCode(String regionCode) {
+        this.regionCode = regionCode == null ? null : regionCode.trim();
+    }
+
+    public String getStreetCode() {
+        return streetCode;
+    }
+
+    public void setStreetCode(String streetCode) {
+        this.streetCode = streetCode == null ? null : streetCode.trim();
+    }
+
+    public Date getWorkTime() {
+        return workTime;
+    }
+
+    public void setWorkTime(Date workTime) {
+        this.workTime = workTime;
+    }
 }

+ 228 - 98
src/main/java/com/hz/employmentsite/model/PcDoworkExample.java

@@ -175,143 +175,73 @@ public class PcDoworkExample {
             return (Criteria) this;
         }
 
-        public Criteria andUserIDIsNull() {
-            addCriterion("UserID is null");
+        public Criteria andSiteUserIDIsNull() {
+            addCriterion("SiteUserID is null");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDIsNotNull() {
-            addCriterion("UserID is not null");
+        public Criteria andSiteUserIDIsNotNull() {
+            addCriterion("SiteUserID is not null");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDEqualTo(String value) {
-            addCriterion("UserID =", value, "userID");
+        public Criteria andSiteUserIDEqualTo(String value) {
+            addCriterion("SiteUserID =", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDNotEqualTo(String value) {
-            addCriterion("UserID <>", value, "userID");
+        public Criteria andSiteUserIDNotEqualTo(String value) {
+            addCriterion("SiteUserID <>", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDGreaterThan(String value) {
-            addCriterion("UserID >", value, "userID");
+        public Criteria andSiteUserIDGreaterThan(String value) {
+            addCriterion("SiteUserID >", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDGreaterThanOrEqualTo(String value) {
-            addCriterion("UserID >=", value, "userID");
+        public Criteria andSiteUserIDGreaterThanOrEqualTo(String value) {
+            addCriterion("SiteUserID >=", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDLessThan(String value) {
-            addCriterion("UserID <", value, "userID");
+        public Criteria andSiteUserIDLessThan(String value) {
+            addCriterion("SiteUserID <", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDLessThanOrEqualTo(String value) {
-            addCriterion("UserID <=", value, "userID");
+        public Criteria andSiteUserIDLessThanOrEqualTo(String value) {
+            addCriterion("SiteUserID <=", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDLike(String value) {
-            addCriterion("UserID like", value, "userID");
+        public Criteria andSiteUserIDLike(String value) {
+            addCriterion("SiteUserID like", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDNotLike(String value) {
-            addCriterion("UserID not like", value, "userID");
+        public Criteria andSiteUserIDNotLike(String value) {
+            addCriterion("SiteUserID not like", value, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDIn(List<String> values) {
-            addCriterion("UserID in", values, "userID");
+        public Criteria andSiteUserIDIn(List<String> values) {
+            addCriterion("SiteUserID in", values, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDNotIn(List<String> values) {
-            addCriterion("UserID not in", values, "userID");
+        public Criteria andSiteUserIDNotIn(List<String> values) {
+            addCriterion("SiteUserID not in", values, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDBetween(String value1, String value2) {
-            addCriterion("UserID between", value1, value2, "userID");
+        public Criteria andSiteUserIDBetween(String value1, String value2) {
+            addCriterion("SiteUserID between", value1, value2, "siteUserID");
             return (Criteria) this;
         }
 
-        public Criteria andUserIDNotBetween(String value1, String value2) {
-            addCriterion("UserID not between", value1, value2, "userID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDIsNull() {
-            addCriterion("SiteID is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDIsNotNull() {
-            addCriterion("SiteID is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDEqualTo(String value) {
-            addCriterion("SiteID =", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDNotEqualTo(String value) {
-            addCriterion("SiteID <>", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDGreaterThan(String value) {
-            addCriterion("SiteID >", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDGreaterThanOrEqualTo(String value) {
-            addCriterion("SiteID >=", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDLessThan(String value) {
-            addCriterion("SiteID <", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDLessThanOrEqualTo(String value) {
-            addCriterion("SiteID <=", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDLike(String value) {
-            addCriterion("SiteID like", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDNotLike(String value) {
-            addCriterion("SiteID not like", value, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDIn(List<String> values) {
-            addCriterion("SiteID in", values, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDNotIn(List<String> values) {
-            addCriterion("SiteID not in", values, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDBetween(String value1, String value2) {
-            addCriterion("SiteID between", value1, value2, "siteID");
-            return (Criteria) this;
-        }
-
-        public Criteria andSiteIDNotBetween(String value1, String value2) {
-            addCriterion("SiteID not between", value1, value2, "siteID");
+        public Criteria andSiteUserIDNotBetween(String value1, String value2) {
+            addCriterion("SiteUserID not between", value1, value2, "siteUserID");
             return (Criteria) this;
         }
 
@@ -704,6 +634,206 @@ public class PcDoworkExample {
             addCriterion("ModifyTime not between", value1, value2, "modifyTime");
             return (Criteria) this;
         }
+
+        public Criteria andRegionCodeIsNull() {
+            addCriterion("RegionCode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeIsNotNull() {
+            addCriterion("RegionCode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeEqualTo(String value) {
+            addCriterion("RegionCode =", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeNotEqualTo(String value) {
+            addCriterion("RegionCode <>", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeGreaterThan(String value) {
+            addCriterion("RegionCode >", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("RegionCode >=", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeLessThan(String value) {
+            addCriterion("RegionCode <", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeLessThanOrEqualTo(String value) {
+            addCriterion("RegionCode <=", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeLike(String value) {
+            addCriterion("RegionCode like", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeNotLike(String value) {
+            addCriterion("RegionCode not like", value, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeIn(List<String> values) {
+            addCriterion("RegionCode in", values, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeNotIn(List<String> values) {
+            addCriterion("RegionCode not in", values, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeBetween(String value1, String value2) {
+            addCriterion("RegionCode between", value1, value2, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionCodeNotBetween(String value1, String value2) {
+            addCriterion("RegionCode not between", value1, value2, "regionCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeIsNull() {
+            addCriterion("StreetCode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeIsNotNull() {
+            addCriterion("StreetCode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeEqualTo(String value) {
+            addCriterion("StreetCode =", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeNotEqualTo(String value) {
+            addCriterion("StreetCode <>", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeGreaterThan(String value) {
+            addCriterion("StreetCode >", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("StreetCode >=", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeLessThan(String value) {
+            addCriterion("StreetCode <", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeLessThanOrEqualTo(String value) {
+            addCriterion("StreetCode <=", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeLike(String value) {
+            addCriterion("StreetCode like", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeNotLike(String value) {
+            addCriterion("StreetCode not like", value, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeIn(List<String> values) {
+            addCriterion("StreetCode in", values, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeNotIn(List<String> values) {
+            addCriterion("StreetCode not in", values, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeBetween(String value1, String value2) {
+            addCriterion("StreetCode between", value1, value2, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andStreetCodeNotBetween(String value1, String value2) {
+            addCriterion("StreetCode not between", value1, value2, "streetCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeIsNull() {
+            addCriterion("WorkTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeIsNotNull() {
+            addCriterion("WorkTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeEqualTo(Date value) {
+            addCriterion("WorkTime =", value, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeNotEqualTo(Date value) {
+            addCriterion("WorkTime <>", value, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeGreaterThan(Date value) {
+            addCriterion("WorkTime >", value, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("WorkTime >=", value, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeLessThan(Date value) {
+            addCriterion("WorkTime <", value, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeLessThanOrEqualTo(Date value) {
+            addCriterion("WorkTime <=", value, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeIn(List<Date> values) {
+            addCriterion("WorkTime in", values, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeNotIn(List<Date> values) {
+            addCriterion("WorkTime not in", values, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeBetween(Date value1, Date value2) {
+            addCriterion("WorkTime between", value1, value2, "workTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkTimeNotBetween(Date value1, Date value2) {
+            addCriterion("WorkTime not between", value1, value2, "workTime");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 11 - 2
src/main/java/com/hz/employmentsite/services/impl/baseSettings/SiteInfoImpl.java

@@ -5,7 +5,9 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.mapper.PcSiteMapper;
 import com.hz.employmentsite.mapper.cquery.SiteInfoCQuery;
 import com.hz.employmentsite.mapper.PcSiteInstitutionMapper;
+import com.hz.employmentsite.model.PcInstitutionExample;
 import com.hz.employmentsite.model.PcSite;
+import com.hz.employmentsite.model.PcSiteExample;
 import com.hz.employmentsite.model.PcSiteInstitution;
 import com.hz.employmentsite.services.service.baseSettings.SiteInfoService;
 import com.hz.employmentsite.util.StringUtils;
@@ -55,8 +57,7 @@ public class SiteInfoImpl implements SiteInfoService {
     public SiteInfoVo get(String siteID) {
         List<String> ids = new ArrayList<>();
         ids.add(siteID);
-        String sqlPrimaryKey = stringUtils.ListToInSql(ids);
-        SiteInfoVo model = siteInfoCQuery.getList(sqlPrimaryKey,null,null ,null,null,null).stream().findFirst().orElse(null);
+        SiteInfoVo model = siteInfoCQuery.getList(stringUtils.ListToInSql(ids),null,null ,null,null,null).stream().findFirst().orElse(null);
         return model;
     }
 
@@ -115,4 +116,12 @@ public class SiteInfoImpl implements SiteInfoService {
         return result;
     }
 
+
+    @Override
+    public Integer delete(List<String> idList){
+        PcSiteExample contactExample = new PcSiteExample();
+        contactExample.or().andSiteIDIn(idList);
+        pcSiteMapper.deleteByExample(contactExample);
+        return pcSiteMapper.deleteByExample(contactExample);
+    }
 }

+ 25 - 0
src/main/java/com/hz/employmentsite/services/impl/baseSettings/UserInfoImpl.java

@@ -5,6 +5,8 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.mapper.PcSiteUserMapper;
 import com.hz.employmentsite.mapper.cquery.UserInfoCQuery;
 import com.hz.employmentsite.model.PcSiteUser;
+import com.hz.employmentsite.model.PcSiteUserExample;
+import com.hz.employmentsite.model.SelectProps;
 import com.hz.employmentsite.services.service.baseSettings.UserInfoService;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.vo.baseSettings.UserInfoVo;
@@ -43,6 +45,19 @@ public class UserInfoImpl implements UserInfoService {
         return model;
     }
 
+    @Override
+    public List<SelectProps> getDataList() {
+        var dataList = getList(1,99999,null,null).getList();
+        List<SelectProps> dataResult = new ArrayList<>();
+        for (var item: dataList) {
+            SelectProps  itemResult = new SelectProps();
+            itemResult.setText(item.name);
+            itemResult.setValue(item.siteUserID);
+            dataResult.add(itemResult);
+        }
+        return dataResult;
+    }
+
     @Override
     public Integer save(UserInfoVo data, String userId) {
         int result = 0;
@@ -53,6 +68,7 @@ public class UserInfoImpl implements UserInfoService {
             //添加
             dbData = new PcSiteUser();
             dbData.setSiteUserID(data.getSiteUserID());
+            dbData.setSiteID(data.getSiteID());
             dbData.setGender(data.getGender());
             dbData.setName(data.getName());
             dbData.setGender(data.getGender());
@@ -65,6 +81,7 @@ public class UserInfoImpl implements UserInfoService {
             //修改
 
             dbData.setSiteUserID(data.siteUserID);
+            dbData.setSiteID(data.getSiteID());
             dbData.setGender(data.gender);
             dbData.setName(data.name);
             dbData.setGender(data.gender);
@@ -76,4 +93,12 @@ public class UserInfoImpl implements UserInfoService {
         }
         return result;
     }
+
+    @Override
+    public Integer delete(List<String> idList){
+        PcSiteUserExample contactExample = new PcSiteUserExample();
+        contactExample.or().andSiteUserIDIn(idList);
+        pcSiteUserMapper.deleteByExample(contactExample);
+        return pcSiteUserMapper.deleteByExample(contactExample);
+    }
 }

+ 21 - 11
src/main/java/com/hz/employmentsite/services/impl/taskAndLog/DoWorkImpl.java

@@ -5,10 +5,9 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.mapper.PcDoworkMapper;
 import com.hz.employmentsite.mapper.cquery.DoWorkCQuery;
 import com.hz.employmentsite.model.PcDowork;
-import com.hz.employmentsite.model.PcSiteUser;
+import com.hz.employmentsite.model.PcDoworkExample;
 import com.hz.employmentsite.services.service.taskAndLog.DoWorkService;
 import com.hz.employmentsite.util.StringUtils;
-import com.hz.employmentsite.vo.baseSettings.UserInfoVo;
 import com.hz.employmentsite.vo.taskAndLog.DoWorkVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -50,26 +49,30 @@ public class DoWorkImpl implements DoWorkService {
     public Integer save(DoWorkVo data, String userId) {
         int result = 0;
         DoWorkVo record = get(data.doWorkID);
-        PcDowork dbData = record ==null ? null : pcDoworkMapper.selectByPrimaryKey(record.doWorkID);
+        PcDowork dbData = record == null ? null : pcDoworkMapper.selectByPrimaryKey(record.doWorkID);
         Boolean isExist = dbData != null;
         if (!isExist) {
             //添加
             dbData = new PcDowork();
-            dbData.setDoTypeID(data.getDoTypeID());
-            dbData.setSiteID(data.getSiteID());
-            dbData.setDoTypeID(data.getDoTypeID());
             dbData.setDoworkID(data.getDoWorkID());
-            dbData.setUserID(data.getUserID());
+            dbData.setSiteUserID(data.getSiteUserID());
+            dbData.setDoTypeID(data.getDoTypeID());
+            dbData.setWorkContent(data.getWorkContent());
+            dbData.setRegionCode(data.getRegionCode());
+            dbData.setStreetCode(data.getStreetCode());
+            dbData.setWorkTime(data.getWorkTime());
             dbData.setCreateUserID(userId);
             dbData.setCreateTime(new Date());
             result = pcDoworkMapper.insert(dbData);
         } else {
             //修改
-            dbData.setDoTypeID(data.doTypeID);
-            dbData.setSiteID(data.siteID);
-            dbData.setDoTypeID(data.doTypeID);
             dbData.setDoworkID(data.doWorkID);
-            dbData.setUserID(data.userID);
+            dbData.setSiteUserID(data.siteUserID);
+            dbData.setDoTypeID(data.doTypeID);
+            dbData.setWorkContent(data.workContent);
+            dbData.setRegionCode(data.regionCode);
+            dbData.setStreetCode(data.streetCode);
+            dbData.setWorkTime(data.workTime);
             dbData.setModifyUserID(userId);
             dbData.setModifyTime(new Date());
             result = pcDoworkMapper.updateByPrimaryKey(dbData);
@@ -77,4 +80,11 @@ public class DoWorkImpl implements DoWorkService {
         return result;
     }
 
+    @Override
+    public Integer delete(List<String> idList){
+        PcDoworkExample contactExample = new PcDoworkExample();
+        contactExample.or().andDoworkIDIn(idList);
+        pcDoworkMapper.deleteByExample(contactExample);
+        return pcDoworkMapper.deleteByExample(contactExample);
+    }
 }

+ 4 - 0
src/main/java/com/hz/employmentsite/services/service/baseSettings/SiteInfoService.java

@@ -3,6 +3,8 @@ package com.hz.employmentsite.services.service.baseSettings;
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.vo.baseSettings.SiteInfoVo;
 
+import java.util.List;
+
 
 public interface SiteInfoService {
 
@@ -13,4 +15,6 @@ public interface SiteInfoService {
     SiteInfoVo get(String siteID);
 
     Integer save(SiteInfoVo data, String userId);
+
+    Integer delete(List<String> idList);
 }

+ 7 - 0
src/main/java/com/hz/employmentsite/services/service/baseSettings/UserInfoService.java

@@ -1,8 +1,11 @@
 package com.hz.employmentsite.services.service.baseSettings;
 
 import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.model.SelectProps;
 import com.hz.employmentsite.vo.baseSettings.UserInfoVo;
 
+import java.util.List;
+
 
 public interface UserInfoService {
 
@@ -10,5 +13,9 @@ public interface UserInfoService {
 
     UserInfoVo get(String siteUserID);
 
+    List<SelectProps> getDataList();
+
     Integer save(UserInfoVo data, String userId);
+
+    Integer delete(List<String> idList);
 }

+ 4 - 0
src/main/java/com/hz/employmentsite/services/service/taskAndLog/DoWorkService.java

@@ -3,10 +3,14 @@ package com.hz.employmentsite.services.service.taskAndLog;
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.vo.taskAndLog.DoWorkVo;
 
+import java.util.List;
+
 public interface DoWorkService {
     PageInfo<DoWorkVo> getList(int pageIndex, int pageSize, String primaryKey, String userName, String workStartDate, String workEndDate, Integer doTypeID, String regionCode, String streetCode);
 
     DoWorkVo get(String doWorkID);
 
     Integer save(DoWorkVo data, String userId);
+
+    Integer delete(List<String> idList);
 }

+ 4 - 4
src/main/java/com/hz/employmentsite/vo/baseSettings/InstitutionVo.java

@@ -1,7 +1,7 @@
 package com.hz.employmentsite.vo.baseSettings;
-import lombok.Data;
 
-import java.sql.Time;
+import lombok.Data;
+import java.sql.Date;
 import java.util.List;
 
 @Data
@@ -23,8 +23,8 @@ public class InstitutionVo {
     public Integer siteCount;
 
     public String createUserID;
-    public Time createTime;
+    public Date createTime;
     public String modifyUserID;
-    public Time modifyTime;
+    public Date modifyTime;
 
 }

+ 6 - 4
src/main/java/com/hz/employmentsite/vo/baseSettings/SiteInfoVo.java

@@ -1,7 +1,8 @@
 package com.hz.employmentsite.vo.baseSettings;
-import lombok.Data;
 
-import java.sql.Time;
+import lombok.Data;
+import java.sql.Date;
+import java.util.List;
 
 @Data
 public class SiteInfoVo {
@@ -24,11 +25,12 @@ public class SiteInfoVo {
     public String siteInstitutionID;
     public String institutionID;
     public String institutionName;
+    public List<UserInfoVo> manageUsers;
     public Integer userCount;
 
     public String createUserID;
-    public Time createTime;
+    public Date createTime;
     public String modifyUserID;
-    public Time modifyTime;
+    public Date modifyTime;
 
 }

+ 4 - 3
src/main/java/com/hz/employmentsite/vo/baseSettings/UserInfoVo.java

@@ -1,6 +1,7 @@
 package com.hz.employmentsite.vo.baseSettings;
+
 import lombok.Data;
-import java.sql.Time;
+import java.sql.Date;
 
 @Data
 public class UserInfoVo {
@@ -15,8 +16,8 @@ public class UserInfoVo {
     public String userTypeName;
 
     public String createBy;
-    public Time createTime;
+    public Date createTime;
     public String updateBy;
-    public Time updateTime;
+    public Date updateTime;
 
 }

+ 7 - 7
src/main/java/com/hz/employmentsite/vo/taskAndLog/DoWorkVo.java

@@ -1,33 +1,33 @@
 package com.hz.employmentsite.vo.taskAndLog;
 
 import lombok.Data;
-import java.sql.Time;
+import java.sql.Date;
 
 @Data
 public class DoWorkVo {
 
     public String doWorkID;
 
-    public String userID;
+    public String siteUserID;
 
     public String userName;
 
-    public String siteID;
-
     public Integer doTypeID;
 
     public String logTypeName;
 
     public String workContent;
 
-    public String workTime;
+    public Date workTime;
 
     public String createUserID;
-    public Time createTime;
+    public Date createTime;
     public String modifyUserID;
-    public Time modifyTime;
+    public Date modifyTime;
 
+    public String regionCode;
     public String regionName;
 
+    public String streetCode;
     public String streetName;
 }

+ 0 - 1
src/main/resources/generatorConfig.xml

@@ -100,7 +100,6 @@
         <table schema="" tableName="pc_post"><property name="useActualColumnNames" value="true"/></table>
         <table schema="" tableName="pc_post"><property name="useActualColumnNames" value="true"/></table>
         <table schema="" tableName="pc_company"><property name="useActualColumnNames" value="true"/></table>
-        <table schema="" tableName="pc_dotask_user"><property name="useActualColumnNames" value="true"/></table>
         -->
 <!--        <table schema="" tableName="pc_jobuser"><property name="useActualColumnNames" value="true"/></table>-->
 

+ 69 - 38
src/main/resources/mapping/PcDoworkMapper.xml

@@ -3,14 +3,16 @@
 <mapper namespace="com.hz.employmentsite.mapper.PcDoworkMapper">
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcDowork">
     <id column="DoworkID" jdbcType="VARCHAR" property="doworkID" />
-    <result column="UserID" jdbcType="VARCHAR" property="userID" />
-    <result column="SiteID" jdbcType="VARCHAR" property="siteID" />
+    <result column="SiteUserID" jdbcType="VARCHAR" property="siteUserID" />
     <result column="DoTypeID" jdbcType="INTEGER" property="doTypeID" />
     <result column="WorkContent" jdbcType="VARCHAR" property="workContent" />
     <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID" />
     <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
     <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID" />
     <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime" />
+    <result column="RegionCode" jdbcType="VARCHAR" property="regionCode" />
+    <result column="StreetCode" jdbcType="VARCHAR" property="streetCode" />
+    <result column="WorkTime" jdbcType="TIMESTAMP" property="workTime" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -71,8 +73,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    DoworkID, UserID, SiteID, DoTypeID, WorkContent, CreateUserID, CreateTime, ModifyUserID, 
-    ModifyTime
+    DoworkID, SiteUserID, DoTypeID, WorkContent, CreateUserID, CreateTime, ModifyUserID, 
+    ModifyTime, RegionCode, StreetCode, WorkTime
   </sql>
   <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample" resultMap="BaseResultMap">
     select
@@ -105,14 +107,14 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.hz.employmentsite.model.PcDowork">
-    insert into pc_dowork (DoworkID, UserID, SiteID, 
-      DoTypeID, WorkContent, CreateUserID, 
-      CreateTime, ModifyUserID, ModifyTime
-      )
-    values (#{doworkID,jdbcType=VARCHAR}, #{userID,jdbcType=VARCHAR}, #{siteID,jdbcType=VARCHAR}, 
-      #{doTypeID,jdbcType=INTEGER}, #{workContent,jdbcType=VARCHAR}, #{createUserID,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
-      )
+    insert into pc_dowork (DoworkID, SiteUserID, DoTypeID, 
+      WorkContent, CreateUserID, CreateTime, 
+      ModifyUserID, ModifyTime, RegionCode, 
+      StreetCode, WorkTime)
+    values (#{doworkID,jdbcType=VARCHAR}, #{siteUserID,jdbcType=VARCHAR}, #{doTypeID,jdbcType=INTEGER}, 
+      #{workContent,jdbcType=VARCHAR}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{regionCode,jdbcType=VARCHAR}, 
+      #{streetCode,jdbcType=VARCHAR}, #{workTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcDowork">
     insert into pc_dowork
@@ -120,11 +122,8 @@
       <if test="doworkID != null">
         DoworkID,
       </if>
-      <if test="userID != null">
-        UserID,
-      </if>
-      <if test="siteID != null">
-        SiteID,
+      <if test="siteUserID != null">
+        SiteUserID,
       </if>
       <if test="doTypeID != null">
         DoTypeID,
@@ -144,16 +143,22 @@
       <if test="modifyTime != null">
         ModifyTime,
       </if>
+      <if test="regionCode != null">
+        RegionCode,
+      </if>
+      <if test="streetCode != null">
+        StreetCode,
+      </if>
+      <if test="workTime != null">
+        WorkTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="doworkID != null">
         #{doworkID,jdbcType=VARCHAR},
       </if>
-      <if test="userID != null">
-        #{userID,jdbcType=VARCHAR},
-      </if>
-      <if test="siteID != null">
-        #{siteID,jdbcType=VARCHAR},
+      <if test="siteUserID != null">
+        #{siteUserID,jdbcType=VARCHAR},
       </if>
       <if test="doTypeID != null">
         #{doTypeID,jdbcType=INTEGER},
@@ -173,6 +178,15 @@
       <if test="modifyTime != null">
         #{modifyTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="regionCode != null">
+        #{regionCode,jdbcType=VARCHAR},
+      </if>
+      <if test="streetCode != null">
+        #{streetCode,jdbcType=VARCHAR},
+      </if>
+      <if test="workTime != null">
+        #{workTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample" resultType="java.lang.Long">
@@ -187,11 +201,8 @@
       <if test="row.doworkID != null">
         DoworkID = #{row.doworkID,jdbcType=VARCHAR},
       </if>
-      <if test="row.userID != null">
-        UserID = #{row.userID,jdbcType=VARCHAR},
-      </if>
-      <if test="row.siteID != null">
-        SiteID = #{row.siteID,jdbcType=VARCHAR},
+      <if test="row.siteUserID != null">
+        SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
       </if>
       <if test="row.doTypeID != null">
         DoTypeID = #{row.doTypeID,jdbcType=INTEGER},
@@ -211,6 +222,15 @@
       <if test="row.modifyTime != null">
         ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="row.regionCode != null">
+        RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+      </if>
+      <if test="row.streetCode != null">
+        StreetCode = #{row.streetCode,jdbcType=VARCHAR},
+      </if>
+      <if test="row.workTime != null">
+        WorkTime = #{row.workTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -219,14 +239,16 @@
   <update id="updateByExample" parameterType="map">
     update pc_dowork
     set DoworkID = #{row.doworkID,jdbcType=VARCHAR},
-      UserID = #{row.userID,jdbcType=VARCHAR},
-      SiteID = #{row.siteID,jdbcType=VARCHAR},
+      SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
       DoTypeID = #{row.doTypeID,jdbcType=INTEGER},
       WorkContent = #{row.workContent,jdbcType=VARCHAR},
       CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
       CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP}
+      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+      RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+      StreetCode = #{row.streetCode,jdbcType=VARCHAR},
+      WorkTime = #{row.workTime,jdbcType=TIMESTAMP}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -234,11 +256,8 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.hz.employmentsite.model.PcDowork">
     update pc_dowork
     <set>
-      <if test="userID != null">
-        UserID = #{userID,jdbcType=VARCHAR},
-      </if>
-      <if test="siteID != null">
-        SiteID = #{siteID,jdbcType=VARCHAR},
+      <if test="siteUserID != null">
+        SiteUserID = #{siteUserID,jdbcType=VARCHAR},
       </if>
       <if test="doTypeID != null">
         DoTypeID = #{doTypeID,jdbcType=INTEGER},
@@ -258,19 +277,31 @@
       <if test="modifyTime != null">
         ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="regionCode != null">
+        RegionCode = #{regionCode,jdbcType=VARCHAR},
+      </if>
+      <if test="streetCode != null">
+        StreetCode = #{streetCode,jdbcType=VARCHAR},
+      </if>
+      <if test="workTime != null">
+        WorkTime = #{workTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where DoworkID = #{doworkID,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcDowork">
     update pc_dowork
-    set UserID = #{userID,jdbcType=VARCHAR},
-      SiteID = #{siteID,jdbcType=VARCHAR},
+    set SiteUserID = #{siteUserID,jdbcType=VARCHAR},
       DoTypeID = #{doTypeID,jdbcType=INTEGER},
       WorkContent = #{workContent,jdbcType=VARCHAR},
       CreateUserID = #{createUserID,jdbcType=VARCHAR},
       CreateTime = #{createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP}
+      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
+      RegionCode = #{regionCode,jdbcType=VARCHAR},
+      StreetCode = #{streetCode,jdbcType=VARCHAR},
+      WorkTime = #{workTime,jdbcType=TIMESTAMP}
     where DoworkID = #{doworkID,jdbcType=VARCHAR}
   </update>
+
 </mapper>

+ 0 - 1
src/main/resources/mapping/cquery/DoWorkCQuery.xml

@@ -6,7 +6,6 @@
         left join (select * from sys_dictionary_item where DictionaryCode ='LogType' ) dic_logType   on workLog.doTypeID = dic_logType.Value
         left join area_code region on workLog.RegionCode = region.code
         left join area_code street on workLog.StreetCode = street.code
-        left join pc_site site on workLog.SiteID = site.SiteID
         left join pc_site_user siteUser on workLog.SiteUserID = siteUser.SiteUserID
         where 1=1
         <if test="primaryKey!='' and primaryKey!=null">

+ 2 - 2
src/main/resources/mapping/cquery/UserInfoCQuery.xml

@@ -3,8 +3,8 @@
 <mapper namespace="com.hz.employmentsite.mapper.cquery.UserInfoCQuery">
     <select id="getList" resultType="com.hz.employmentsite.vo.baseSettings.UserInfoVo">
         select siteUser.*,dic_userRole.Name as userTypeName,dic_gender.Name as genderName  from pc_site_user siteUser
-        left join (select * from sys_dictionary_item where DictionaryCode ='SiteUserRole' ) dic_userRole   on siteUser.RoleID = dic_userRole.Value
-        left join (select * from sys_dictionary_item where DictionaryCode ='Gender' ) dic_gender   on siteUser.RoleID = dic_gender.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='SiteUserRole' ) dic_userRole  on siteUser.RoleID = dic_userRole.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='Gender' ) dic_gender  on siteUser.Gender = dic_gender.Value
         where 1=1
         <if test="primaryKey!='' and primaryKey!=null">
             and siteUserID in (${primaryKey})

+ 29 - 0
vue/src/api/baseSettings/userInfo.ts

@@ -13,6 +13,20 @@ export function getSiteUserList(params: any) {
     },
   );
 }
+
+export function getDataList(){
+  return request<any>(
+    {
+      url: 'userInfo/getDataList',
+      method: 'get',
+      params: null,
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
 export function getSiteUserByID(siteUserID: string) {
   return request<object>(
     {
@@ -41,3 +55,18 @@ export function saveSiteUser(data: any) {
   );
 }
 
+export function delSiteUser(data: any) {
+  return request<object>(
+    {
+      url: 'userInfo/delete',
+      method: 'post',
+      data: data,
+    },
+    {
+      isNew: true,
+      successMsg: '删除成功!',
+      errorMsg: '删除失败!'
+    },
+  );
+}
+

+ 1 - 1
vue/src/api/system/area/index.ts

@@ -14,7 +14,7 @@ export function getStreetCodeList(code:string) {
   return request<any>({
     url: 'system/area/getAreaList',
     method: 'get',
-    params: { code:code},
+    params: {code:code},
   }, {
     isNew: true,
   });

+ 15 - 0
vue/src/api/taskAndLog/dowork.ts

@@ -40,3 +40,18 @@ export function save(data: any) {
     },
   );
 }
+
+export function delWorkLog(data: any) {
+  return request<object>(
+    {
+      url: 'doWork/delete',
+      method: 'post',
+      data: data,
+    },
+    {
+      isNew: true,
+      successMsg: '删除成功!',
+      errorMsg: '删除失败!'
+    },
+  );
+}

+ 55 - 44
vue/src/views/baseSettings/institution/edit.vue

@@ -97,8 +97,7 @@
                     v-model:value="manageSites[index][column.key]"
                     :options="allSites"
                     @change="manageSitesChange(index,manageSites[index][column.key])"
-                    :field-names="{ label: 'siteName', value: 'siteID' }"
-                    :allow-clear="true" style="width: 200px" >
+                    :field-names="{ label: 'siteName', value: 'siteID' }" style="width: 200px" >
                   </a-select>
                 </div>
               </template>
@@ -155,6 +154,7 @@ export default defineComponent({
     const title = ref();
     const isAllowCommit = ref<boolean>(false);
     const isDetail = ref<boolean>(false);
+    const isAllowAdd = ref<boolean>(true);
     const pageParams = reactive({
       pageIndex: 1,
       pageSize: 10,
@@ -178,7 +178,7 @@ export default defineComponent({
       selectedRowKeys: [],
       loading: false
     });
-    const allSites = ref([]);
+    const allSites = ref<any>([]);
     const manageSites = ref<any>([]);
 
     const loadData = (id: string) => {
@@ -210,15 +210,21 @@ export default defineComponent({
       pageParams.institutionID = id;
       getListByInstitutionID(pageParams).then((result :any)=> {
           manageSites.value = result.list;
-          console.log('manageSites',manageSites);
       });
     }
 
     const addSite = () => {
-      (manageSites.value as any[]).push({siteID: null,siteName: '', detailAddress:''});
+      if(allSites.value.length >0){
+        const newSite = allSites.value[0];
+        (manageSites.value as any[]).push({siteID:newSite.siteID,siteName:newSite.siteName,detailAddress:newSite.detailAddress});
+        isAllowAdd.value = false;
+      }else{
+        message.error("未查询到站点信息!");
+      }
     }
     const delSite = (site) =>{
       (manageSites.value as any[]).splice(site, 1);
+      validateSameSite();
     }
 
     const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {
@@ -231,53 +237,56 @@ export default defineComponent({
     };
 
     const manageSitesChange = (index:any,siteID:any) =>{
-      const isAllowAdd = ref<boolean>(true);
+      isAllowAdd.value = true
+      console.log('manageSite',manageSites.value);
+      getSiteByID(siteID).then((result :any)=> {
+        manageSites.value[index]= result;
+      });
+      /*validateSameSite();*/
+    }
+
+    const validateSameSite = ()=>{
+      console.log("manageSites",manageSites.value);
       manageSites.value.forEach(item=>{
-        if (item.siteID == siteID){
+        const sameData = manageSites.value.filter(x => x.siteID == item.siteID);
+        console.log("sameData",sameData);
+        if (sameData.value.length >1){
           isAllowAdd.value = false;
-          return;
         }
       });
-      if (isAllowAdd.value){
-        getSiteByID(siteID).then((result :any)=> {
-          manageSites.value[index]= result;
-        });
-        console.log('manageSites',manageSites.value);
-      }else{
-        (manageSites.value as any[]).splice(index, 1);
-        message.error("不允许添加相同的站点!");
-      }
     }
 
-    const validate = ()  =>{
-      console.log('dataModel',formData.dataModel);
-      if (formData.dataModel.companyName==null) {
-        message.error("请输入企业名称!");
-        return;
-      }else if (formData.dataModel.companyAddress==null) {
-        message.error("请输入企业地址!");
-        return;
-      }else if (formData.dataModel.fzrName==null) {
-        message.error("请输入负责人名称!");
-        return;
-      }else if (formData.dataModel.fzrMobile==null) {
-        message.error("请填写负责人电话!");
-        return;
-      }else if (formData.dataModel.frName==null) {
-        message.error("请填写法人姓名!");
-        return;
-      }else if (formData.dataModel.frMobile==null) {
-        message.error("请填写法人电话!");
-        return;
-      }else if (formData.dataModel.companyCode==null) {
-        message.error("请填写企业机构代码!");
-        return;
-      }
-      isAllowCommit.value = true;
+    const validateCommit = ()  =>{
+        if (!isAllowAdd.value){
+          message.error("不允许添加相同的站点!");
+          return;
+        }else if (formData.dataModel.companyName==null) {
+          message.error("请输入企业名称!");
+          return;
+        }else if (formData.dataModel.companyAddress==null) {
+          message.error("请输入企业地址!");
+          return;
+        }else if (formData.dataModel.fzrName==null) {
+          message.error("请输入负责人名称!");
+          return;
+        }else if (formData.dataModel.fzrMobile==null) {
+          message.error("请填写负责人电话!");
+          return;
+        }else if (formData.dataModel.frName==null) {
+          message.error("请填写法人姓名!");
+          return;
+        }else if (formData.dataModel.frMobile==null) {
+          message.error("请填写法人电话!");
+          return;
+        }else if (formData.dataModel.companyCode==null) {
+          message.error("请填写企业机构代码!");
+          return;
+        }
+        isAllowCommit.value = true;
     };
 
     const handleOk = () => {
-      validate();
+      validateCommit();
       if (isAllowCommit.value){
         formData.dataModel.manageSites = manageSites.value;
         saveInstitution(formData.dataModel).then(result => {
@@ -304,6 +313,7 @@ export default defineComponent({
       /*feedbackDateDetail,
       resolveDateDetail,*/
       isAllowCommit,
+      isAllowAdd,
       isDetail,
       visible,
       title,
@@ -318,7 +328,8 @@ export default defineComponent({
       manageSitesChange,
       handleOk,
       handleCancel,
-      validate
+      validateCommit,
+      validateSameSite
     };
   },
   created() {

+ 9 - 20
vue/src/views/baseSettings/site/edit.vue

@@ -39,7 +39,7 @@
           <a-form-item label="所属县区"  name="RegionCode" :label-col="{span:7}">
             <label v-if="isDetail">{{dataModel.regionCode}}</label>
             <a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.regionCode" :options="regionList"
-              :field-names="{ label: 'name', value: 'code' }" :allow-clear="true" @change="changeRegion" > </a-select>
+              :field-names="{ label: 'name', value: 'code' }" :allow-clear="true" @change="getStreetList('')" > </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="7">
@@ -119,39 +119,32 @@ export default defineComponent({
 
     const regionList = ref<SelectProps['options']>();
     const streetList = ref<SelectProps['options']>();
-    const institutionList =ref<SelectProps["options"]>();
+    const institutionList = ref<SelectProps["options"]>();
 
     const getRegionList = async function(){
       const regionResult: any = await getRegionCodeList();
-      console.log('regionResult',regionResult);
       regionList.value = regionResult;
     }
-
-    const getStreetList = async function(){
-      const streetResult: any = await getStreetCodeList(formData.dataModel.regionCode);
-      console.log('streetResult',streetResult);
+    const getStreetList = async function(regionCode: string){
+      const streetResult: any = await getStreetCodeList(regionCode);
       streetList.value = streetResult;
     }
-
     const getInstitutionList = async function(){
       const institutionResult :any = await getDataList();
       console.log('institutionResult',institutionResult);
       institutionList.value = institutionResult;
     }
 
-    const changeRegion = async function(){
-      formData.dataModel.streetCode = '';
-      getStreetList();
-    }
-
     const loadData = (siteID: string) => {
       getSiteByID(siteID).then((result: any) => {
         formData.dataModel = result;
-        getStreetList();
+        console.log("dataModel",formData.dataModel);
+        if (formData.dataModel.regionCode != null){
+          getStreetList(formData.dataModel.regionCode);
+        }
         if (formData.dataModel.siteX !=null && formData.dataModel.siteY != null){
           formData.dataModel.sitePosition = "X:"+formData.dataModel.siteX+" Y:"+formData.dataModel.siteX;
         }
-        console.log(formData.dataModel);
       });
     }
 
@@ -162,12 +155,11 @@ export default defineComponent({
       visible.value = true;
     };
 
-
     const onSelectChange = (selectedRowKeys: any) => {
       formState.selectedRowKeys = selectedRowKeys;
     };
 
-    const validate = ()  =>{
+    const validate = () => {
       console.log(formData.dataModel);
       if (formData.dataModel.siteCode==null) {
         message.error("请输入驿站编号!");
@@ -195,8 +187,6 @@ export default defineComponent({
       visible.value = false;
     };
 
-
-
     return {
       ...toRefs(formData),
       formState,
@@ -213,7 +203,6 @@ export default defineComponent({
       getStreetList,
       getInstitutionList,
       onSelectChange,
-      changeRegion,
       handleOk,
       handleCancel,
       validate

+ 23 - 4
vue/src/views/baseSettings/user/edit.vue

@@ -22,7 +22,8 @@
         <a-col :span="7">
           <a-form-item label="性别" name="Gender" :label-col="{span:7}">
             <label v-if="isDetail">{{dataModel.gender }}</label>
-            <a-input v-model:value="dataModel.gender" placeholder=""/>
+            <a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.gender" :options="genderList"
+                      :field-names="{ label: 'name', value: 'value' }" :allow-clear="false" > </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="10">
@@ -36,7 +37,8 @@
         <a-col :span="7">
           <a-form-item label="角色"  name="RoleID" :label-col="{span:7}">
             <label v-if="isDetail">{{dataModel.roleID }}</label>
-            <a-input v-model:value="dataModel.roleID" placeholder=""/>
+            <a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.roleID" :options="roleList"
+                      :field-names="{ label: 'name', value: 'value' }" :allow-clear="false" > </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="7">
@@ -53,7 +55,8 @@
 import {defineComponent, reactive, ref, toRefs} from "vue";
 import {getSiteUserByID, saveSiteUser} from "@/api/baseSettings/userInfo";
 import BUploadFile from "@/components/file/uploadFile.vue";
-import {message} from "ant-design-vue";
+import {message, SelectProps} from "ant-design-vue";
+import {getSysDictionaryList} from "@/api/system/dictionary";
 
 interface InstitutionModel {
   dataModel: any;
@@ -79,6 +82,8 @@ export default defineComponent({
       selectedRowKeys: [],
       loading: false
     });
+    const genderList =  ref<SelectProps["options"]>();
+    const roleList =  ref<SelectProps["options"]>();
 
     const loadData = (siteUserID: string) => {
       getSiteUserByID(siteUserID).then((result: any) => {
@@ -88,13 +93,25 @@ export default defineComponent({
     }
 
     const show = (id: any,method:string,ifDetail:boolean) => {
-      isDetail.value = ifDetail;
       loadData(id);
       title.value ="人员管理-"+method;
+      isDetail.value = ifDetail;
+      getGenderList();
+      getRoleList();
       visible.value = true;
     };
 
 
+    const getGenderList = async function(){
+      const genderResult :any = await getSysDictionaryList("Gender");
+      genderList.value = genderResult;
+    }
+
+    const getRoleList = async function(){
+      const roleResult :any = await getSysDictionaryList("SiteUserRole");
+      roleList.value = roleResult;
+    }
+
     const onSelectChange = (selectedRowKeys: any) => {
       formState.selectedRowKeys = selectedRowKeys;
     };
@@ -137,6 +154,8 @@ export default defineComponent({
       visible,
       title,
       confirmLoading,
+      genderList,
+      roleList,
       show,
       onSelectChange,
       handleOk,

+ 4 - 2
vue/src/views/baseSettings/user/index.vue

@@ -50,7 +50,7 @@ import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
 import {DownOutlined, ExclamationCircleOutlined, UpOutlined} from '@ant-design/icons-vue';
 import type {FormInstance} from 'ant-design-vue';
 import type {TableColumnsType, TableProps} from 'ant-design-vue';
-import {getSiteUserList} from '@/api/baseSettings/userInfo';
+import {getSiteUserList,delSiteUser} from '@/api/baseSettings/userInfo';
 import UserInfoEditForm from "@/views/baseSettings/user/edit.vue";
 import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
 import {getPaginationTotalTitle} from "@/utils/common";
@@ -124,7 +124,9 @@ export default defineComponent({
         okButtonProps: {},
         cancelText: '取消',
         onOk() {
-
+          delSiteUser(formState.selectedRowKeys).then(() => {
+            loadData();
+          });
         },
         onCancel() {
 

+ 71 - 10
vue/src/views/taskAndLog/dowork/edit.vue

@@ -16,22 +16,48 @@
         <a-col :span="7">
           <a-form-item label="姓名" name="UserName" :label-col="{span:7}">
             <label v-if="isDetail">{{dataModel.userName}}</label>
-            <a-input v-model:value="dataModel.userName" placeholder=""/>
+            <a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.siteUserID" :options="siteUserList"
+                      :field-names="{ label: 'text', value: 'value' }" :allow-clear="true" > </a-select>
+<!--            <a-input v-model:value="dataModel.userName" placeholder=""/>-->
           </a-form-item>
         </a-col>
         <a-col :span="7">
             <a-form-item label="日志类型" name="LogTypeName" :label-col="{span:7}">
             <label v-if="isDetail">{{dataModel.logTypeName }}</label>
-            <a-input v-model:value="dataModel.logTypeName" placeholder=""/>
+              <a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.doTypeID" :options="logTypeList"
+                        :field-names="{ label: 'name', value: 'value' }" :allow-clear="false" > </a-select>
+<!--            <a-input v-model:value="dataModel.logTypeName" placeholder=""/>-->
           </a-form-item>
         </a-col>
         <a-col :span="10">
           <a-form-item label="完成时间" name="WorkTime" :label-col="{span:10}" >
             <label v-if="isDetail">{{dataModel.workTime}}</label>
-            <a-input v-model:value="dataModel.workTime" placeholder=""/>
+            <a-date-picker
+              v-model:value="dataModel.workTime"
+              picker="date"
+              value-format="YYYY-MM-DD"
+            />
           </a-form-item>
         </a-col>
       </a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="所属县区"  name="RegionCode" :label-col="{span:7}">
+            <label v-if="isDetail">{{dataModel.regionCode}}</label>
+            <a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.regionCode" :options="regionList"
+                      :field-names="{ label: 'name', value: 'code' }" :allow-clear="true" @change="getStreetList('')" > </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="所属街道"  name="StreetCode" :label-col="{span:7}">
+            <label v-if="isDetail">{{dataModel.streetCode }}</label>
+            <a-select  v-if ="!isDetail" ref="select" v-model:value="dataModel.streetCode" :options="streetList"
+                       :field-names="{ label: 'name', value: 'code' }" :allow-clear="true" > </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="10">
+        </a-col>
+      </a-row>
       <a-row>
         <a-textarea :auto-size="{ minRows: 4, maxRows: 10 }"  v-model:value="dataModel.workContent"  :disabled="isDetail"
                     placeholder="完成情况" style="text-align: center;" />
@@ -47,7 +73,10 @@
 import {defineComponent, reactive, ref, toRefs} from "vue";
 import {get, save} from "@/api/taskAndLog/dowork";
 import BUploadFile from "@/components/file/uploadFile.vue";
-import {message} from "ant-design-vue";
+import {message, SelectProps} from "ant-design-vue";
+import {getSysDictionaryList} from "@/api/system/dictionary";
+import {getRegionCodeList, getStreetCodeList} from "@/api/system/area/index";
+import {getDataList} from "@/api/baseSettings/userInfo";
 
 interface InstitutionModel {
   dataModel: any;
@@ -64,7 +93,6 @@ export default defineComponent({
   setup(props) {
     const formData = reactive<InstitutionModel>({ dataModel:{}});
     const visible = ref<boolean>(false);
-    const fileList = ref();
     const confirmLoading = ref<boolean>(false);
     const title = ref();
     const isAllowCommit = ref<boolean>(false);
@@ -74,21 +102,50 @@ export default defineComponent({
       selectedRowKeys: [],
       loading: false
     });
+    const regionList = ref<SelectProps['options']>();
+    const streetList = ref<SelectProps['options']>();
+    const logTypeList = ref<SelectProps["options"]>();
+    const siteUserList = ref<SelectProps["options"]>();
+
+    const fileList = ref();
     const setFileList = (files) => {
       fileList.value = files;
+    };
+    const getRegionList = async function(){
+      const regionResult: any = await getRegionCodeList();
+      regionList.value = regionResult;
+    }
+    const getStreetList = async function(regionCode: string){
+      const streetResult: any = await getStreetCodeList(regionCode);
+      streetList.value = streetResult;
+    }
+    const getSiteUserList = async function(){
+      const siteUserResult :any = await getDataList();
+      console.log('siteUserResult',siteUserResult);
+      siteUserList.value = siteUserResult;
+    }
+    const getLogTypeList = async function(){
+      const logTypeResult :any = await getSysDictionaryList("LogType");
+      logTypeList.value = logTypeResult;
     }
 
     const loadData = (doWorkID: string) => {
       get(doWorkID).then((result: any) => {
         formData.dataModel = result;
         console.log(formData.dataModel);
+        if (formData.dataModel.regionCode != null){
+          getStreetList(formData.dataModel.regionCode);
+        }
       });
     }
 
     const show = (id: any,method:string,ifDetail:boolean) => {
-      isDetail.value = ifDetail;
       loadData(id);
       title.value ="工作日志管理-"+method;
+      isDetail.value = ifDetail;
+      getRegionList();
+      getLogTypeList();
+      getSiteUserList();
       visible.value = true;
     };
 
@@ -98,7 +155,7 @@ export default defineComponent({
 
     const validate = ()  =>{
       console.log(formData.dataModel);
-      if (formData.dataModel.userName==null) {
+      if (formData.dataModel.siteUserID==null) {
         message.error("请输入姓名!");
         return;
       }
@@ -121,8 +178,6 @@ export default defineComponent({
       visible.value = false;
     };
 
-
-
     return {
       ...toRefs(formData),
       formState,
@@ -131,11 +186,17 @@ export default defineComponent({
       visible,
       title,
       confirmLoading,
+      logTypeList,
+      siteUserList,
+      regionList,
+      streetList,
       show,
+      getRegionList,
+      getStreetList,
+      setFileList,
       onSelectChange,
       handleOk,
       handleCancel,
-      setFileList,
       validate
     };
   },

+ 24 - 6
vue/src/views/taskAndLog/dowork/index.vue

@@ -83,15 +83,15 @@
 </template>
 
 <script lang="ts">
-import {reactive, ref, computed, defineComponent} from 'vue';
-import {DownOutlined, UpOutlined} from '@ant-design/icons-vue';
+import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
+import {DownOutlined, ExclamationCircleOutlined, UpOutlined} from '@ant-design/icons-vue';
 import type {FormInstance,SelectProps,TableColumnsType, TableProps} from 'ant-design-vue';
-import {getList} from '@/api/taskAndLog/dowork';
+import {getList,delWorkLog} from '@/api/taskAndLog/dowork';
 import {getRegionCodeList,getStreetCodeList} from '@/api/system/area/index';
 import DoWorkEditForm from "@/views/taskAndLog/dowork/edit.vue";
 import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
 import {getPaginationTotalTitle} from "@/utils/common";
-import {message} from "ant-design-vue";
+import {message, Modal} from "ant-design-vue";
 import dayjs from 'dayjs';
 import {get} from "@/api/common";
 export default defineComponent({
@@ -106,7 +106,7 @@ export default defineComponent({
       userName:'',
       workStartDate:null,
       workEndDate:null,
-      doTypeID:1,
+      doTypeID: null,
       regionCode:'',
       streetCode:''
     });
@@ -170,7 +170,7 @@ export default defineComponent({
       formState.loading = true;
       const result: any = await getList(searchParams);
       dataList.value = result.list;
-      console.log(dataList.value);
+      console.log("dataList",dataList.value);
       formState.total = result.total;
       formState.loading = false;
     }
@@ -206,6 +206,24 @@ export default defineComponent({
         return false;
       }
 
+      Modal.confirm({
+        title: '确认删除选中的人员信息?',
+        icon: createVNode(ExclamationCircleOutlined),
+        content: '',
+        okText: '确认删除',
+        okType: 'danger',
+        okButtonProps: {},
+        cancelText: '取消',
+        onOk() {
+          delWorkLog(formState.selectedRowKeys).then(() => {
+            loadData();
+          });
+        },
+        onCancel() {
+
+        },
+      });
+
     };
 
     const importPost = () => {