Browse Source

Merge branch 'test' of jishutao/kede-server into prod

anderx 4 years ago
parent
commit
1fd2d790d8
39 changed files with 3079 additions and 28 deletions
  1. 1 1
      GeneratorConfig.xml
  2. 60 0
      src/main/java/com/goafanti/admin/bo/InputPublicDtails.java
  3. 42 0
      src/main/java/com/goafanti/admin/bo/InputPublicRelease.java
  4. 28 0
      src/main/java/com/goafanti/admin/bo/InputPublicReleaseList.java
  5. 66 0
      src/main/java/com/goafanti/admin/bo/InputPublicStatistics.java
  6. 55 0
      src/main/java/com/goafanti/admin/bo/OutPublicDtails.java
  7. 62 0
      src/main/java/com/goafanti/admin/bo/OutPublicRelease.java
  8. 62 0
      src/main/java/com/goafanti/admin/bo/OutPublicReleaseList.java
  9. 42 0
      src/main/java/com/goafanti/admin/bo/OutPublicStatistics.java
  10. 41 0
      src/main/java/com/goafanti/admin/bo/outPublicReleaseLog.java
  11. 30 2
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  12. 172 0
      src/main/java/com/goafanti/admin/controller/AdminReleaseApiController.java
  13. 36 0
      src/main/java/com/goafanti/admin/service/PublicReleaseService.java
  14. 184 0
      src/main/java/com/goafanti/admin/service/impl/PublicReleaseServiceImpl.java
  15. 1 1
      src/main/java/com/goafanti/common/constant/AFTConstants.java
  16. 10 4
      src/main/java/com/goafanti/common/controller/PublicController.java
  17. 2 0
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  18. 55 0
      src/main/java/com/goafanti/common/dao/PublicReleaseCountMapper.java
  19. 47 0
      src/main/java/com/goafanti/common/dao/PublicReleaseLogMapper.java
  20. 53 0
      src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java
  21. 12 1
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  22. 164 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseCountMapper.xml
  23. 152 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseLogMapper.xml
  24. 570 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  25. 4 4
      src/main/java/com/goafanti/common/mapper/ThirdPartyCompanyMapper.xml
  26. 11 2
      src/main/java/com/goafanti/common/model/Admin.java
  27. 484 0
      src/main/java/com/goafanti/common/model/PublicRelease.java
  28. 269 0
      src/main/java/com/goafanti/common/model/PublicReleaseCount.java
  29. 166 0
      src/main/java/com/goafanti/common/model/PublicReleaseLog.java
  30. 90 0
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  31. 2 0
      src/main/java/com/goafanti/common/utils/DateUtils.java
  32. 83 0
      src/main/java/com/goafanti/common/utils/HttpUtils.java
  33. 3 2
      src/main/java/com/goafanti/core/shiro/session/CustomSessionManager.java
  34. 2 0
      src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java
  35. 1 1
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  36. 1 1
      src/main/java/com/goafanti/customer/service/CustomerService.java
  37. 3 3
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  38. 10 6
      src/main/resources/props/config_local.properties
  39. 3 0
      src/main/resources/props/config_test.properties

+ 1 - 1
GeneratorConfig.xml

@@ -43,7 +43,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="user_service_follow"
+    <table schema="aft" tableName="public_release"
 	enableCountByExample="false" enableUpdateByExample="false"
 	enableDeleteByExample="false" enableSelectByExample="false"
 	selectByExampleQueryId="false" enableSelectByPrimaryKey="true"

+ 60 - 0
src/main/java/com/goafanti/admin/bo/InputPublicDtails.java

@@ -0,0 +1,60 @@
+package com.goafanti.admin.bo;
+
+public class InputPublicDtails {
+	
+	private String releaseStart;
+	private String releaseEnd;
+	private String aid;
+	private String uid;
+	private Integer status;
+	private Integer pageSize;
+	private Integer pageNo;
+	
+	
+	
+
+	public String getAid() {
+		return aid;
+	}
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+	public Integer getPageSize() {
+		return pageSize;
+	}
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+	public Integer getPageNo() {
+		return pageNo;
+	}
+	public void setPageNo(Integer pageNo) {
+		this.pageNo = pageNo;
+	}
+	public String getUid() {
+		return uid;
+	}
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public String getReleaseStart() {
+		return releaseStart;
+	}
+	public void setReleaseStart(String releaseStart) {
+		this.releaseStart = releaseStart;
+	}
+	public String getReleaseEnd() {
+		return releaseEnd;
+	}
+	public void setReleaseEnd(String releaseEnd) {
+		this.releaseEnd = releaseEnd;
+	}
+	
+	
+}

+ 42 - 0
src/main/java/com/goafanti/admin/bo/InputPublicRelease.java

@@ -0,0 +1,42 @@
+package com.goafanti.admin.bo;
+
+import com.goafanti.common.model.PublicRelease;
+
+public class InputPublicRelease extends PublicRelease {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	private String releaseStarts;
+	
+	private String releaseEnds;
+	
+	private String ocbId;
+
+	public String getReleaseStarts() {
+		return releaseStarts;
+	}
+
+	public void setReleaseStarts(String releaseStarts) {
+		this.releaseStarts = releaseStarts;
+	}
+
+	public String getReleaseEnds() {
+		return releaseEnds;
+	}
+
+	public void setReleaseEnds(String releaseEnds) {
+		this.releaseEnds = releaseEnds;
+	}
+
+	public String getOcbId() {
+		return ocbId;
+	}
+
+	public void setOcbId(String ocbId) {
+		this.ocbId = ocbId;
+	}
+
+}

+ 28 - 0
src/main/java/com/goafanti/admin/bo/InputPublicReleaseList.java

@@ -0,0 +1,28 @@
+package com.goafanti.admin.bo;
+
+public class InputPublicReleaseList {
+	
+	private Integer pageSize;
+	private Integer pageNo;
+	private Integer type;
+	public Integer getPageSize() {
+		return pageSize;
+	}
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+	public Integer getPageNo() {
+		return pageNo;
+	}
+	public void setPageNo(Integer pageNo) {
+		this.pageNo = pageNo;
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	
+
+}

+ 66 - 0
src/main/java/com/goafanti/admin/bo/InputPublicStatistics.java

@@ -0,0 +1,66 @@
+package com.goafanti.admin.bo;
+
+public class InputPublicStatistics {
+	
+	private String clockStart;
+	private String clockEnd;
+	private String createStart;
+	private String createEnd;
+	private String aid;
+	private String depId;
+	private Integer pageSize;
+	private Integer pageNo;
+	
+	
+	
+	public String getClockStart() {
+		return clockStart;
+	}
+	public void setClockStart(String clockStart) {
+		this.clockStart = clockStart;
+	}
+	public String getClockEnd() {
+		return clockEnd;
+	}
+	public void setClockEnd(String clockEnd) {
+		this.clockEnd = clockEnd;
+	}
+	public String getCreateStart() {
+		return createStart;
+	}
+	public void setCreateStart(String createStart) {
+		this.createStart = createStart;
+	}
+	public String getCreateEnd() {
+		return createEnd;
+	}
+	public void setCreateEnd(String createEnd) {
+		this.createEnd = createEnd;
+	}
+	public String getAid() {
+		return aid;
+	}
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+	public String getDepId() {
+		return depId;
+	}
+	public void setDepId(String depId) {
+		this.depId = depId;
+	}
+	public Integer getPageSize() {
+		return pageSize;
+	}
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+	public Integer getPageNo() {
+		return pageNo;
+	}
+	public void setPageNo(Integer pageNo) {
+		this.pageNo = pageNo;
+	}
+	
+	
+}

+ 55 - 0
src/main/java/com/goafanti/admin/bo/OutPublicDtails.java

@@ -0,0 +1,55 @@
+package com.goafanti.admin.bo;
+
+public class OutPublicDtails {
+
+	private String nickname;
+	private String userName;
+	private String aname;
+	private String duration;
+	private String status;
+	private String releaseStarts;
+	private String releaseEnds;
+	public String getNickname() {
+		return nickname;
+	}
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getAname() {
+		return aname;
+	}
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+	public String getDuration() {
+		return duration;
+	}
+	public void setDuration(String duration) {
+		this.duration = duration;
+	}
+	public String getStatus() {
+		return status;
+	}
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	public String getReleaseStarts() {
+		return releaseStarts;
+	}
+	public void setReleaseStarts(String releaseStarts) {
+		this.releaseStarts = releaseStarts;
+	}
+	public String getReleaseEnds() {
+		return releaseEnds;
+	}
+	public void setReleaseEnds(String releaseEnds) {
+		this.releaseEnds = releaseEnds;
+	}
+
+}

+ 62 - 0
src/main/java/com/goafanti/admin/bo/OutPublicRelease.java

@@ -0,0 +1,62 @@
+package com.goafanti.admin.bo;
+
+public class OutPublicRelease {
+	private Integer id;
+	private String nickname;
+	private String aname;
+	private String releaseStarts;
+	private String userName;
+	private String releaseEnds;
+	private String createTimes;
+	private Integer status;
+	public Integer getId() {
+		return id;
+	}
+	public void setId(Integer id) {
+		this.id = id;
+	}
+	public String getNickname() {
+		return nickname;
+	}
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+	public String getAname() {
+		return aname;
+	}
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+	public String getReleaseStarts() {
+		return releaseStarts;
+	}
+	public void setReleaseStarts(String releaseStarts) {
+		this.releaseStarts = releaseStarts;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getReleaseEnds() {
+		return releaseEnds;
+	}
+	public void setReleaseEnds(String releaseEnds) {
+		this.releaseEnds = releaseEnds;
+	}
+	public String getCreateTimes() {
+		return createTimes;
+	}
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	
+	
+}

+ 62 - 0
src/main/java/com/goafanti/admin/bo/OutPublicReleaseList.java

@@ -0,0 +1,62 @@
+package com.goafanti.admin.bo;
+
+public class OutPublicReleaseList {
+	
+	private String id;
+	private String nickname;
+	private String userName;
+	private String aname;
+	private String releaseStarts;
+	private String releaseEnds;
+	private String createTimes;
+	private Integer status;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getNickname() {
+		return nickname;
+	}
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+	public String getAname() {
+		return aname;
+	}
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+	public String getReleaseStarts() {
+		return releaseStarts;
+	}
+	public void setReleaseStarts(String releaseStarts) {
+		this.releaseStarts = releaseStarts;
+	}
+	public String getReleaseEnds() {
+		return releaseEnds;
+	}
+	public void setReleaseEnds(String releaseEnds) {
+		this.releaseEnds = releaseEnds;
+	}
+	public String getCreateTimes() {
+		return createTimes;
+	}
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	
+}

+ 42 - 0
src/main/java/com/goafanti/admin/bo/OutPublicStatistics.java

@@ -0,0 +1,42 @@
+package com.goafanti.admin.bo;
+
+public class OutPublicStatistics {
+
+	private String name;
+	private Integer tg;
+	private Integer wsh;
+	private Integer bh;
+	private Double duration;
+	public Integer getBh() {
+		return bh;
+	}
+	public void setBh(Integer bh) {
+		this.bh = bh;
+	}
+	public Integer getWsh() {
+		return wsh;
+	}
+	public void setWsh(Integer wsh) {
+		this.wsh = wsh;
+	}
+	public Integer getTg() {
+		return tg;
+	}
+	public void setTg(Integer tg) {
+		this.tg = tg;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public Double getDuration() {
+		return duration;
+	}
+	public void setDuration(Double duration) {
+		this.duration = duration;
+	}
+	
+	
+}

+ 41 - 0
src/main/java/com/goafanti/admin/bo/outPublicReleaseLog.java

@@ -0,0 +1,41 @@
+package com.goafanti.admin.bo;
+
+import java.util.Date;
+
+import com.goafanti.common.model.PublicReleaseLog;
+
+public class outPublicReleaseLog extends PublicReleaseLog{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public outPublicReleaseLog(Integer id, String aid, Integer status, String remarks, Date date) {
+		super(id, aid, status, remarks, date);
+		
+	}
+	public outPublicReleaseLog() {
+		super();
+	}
+	
+	public String getAname() {
+		return aname;
+	}
+
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+
+	public String getCreateTimes() {
+		return createTimes;
+	}
+
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+
+	private String aname;
+
+	private String createTimes;
+}

+ 30 - 2
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -16,13 +16,14 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import com.alibaba.fastjson.JSONObject;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.cognizance.bo.ActivityNumberBo;
 import com.goafanti.cognizance.bo.AnnualReportBo;
@@ -31,7 +32,6 @@ import com.goafanti.cognizance.bo.InputApplyCognizance;
 import com.goafanti.cognizance.bo.InputOrgActivity;
 import com.goafanti.cognizance.bo.InputOrgActivityCost;
 import com.goafanti.cognizance.bo.InputOrgAnnualReport;
-import com.goafanti.cognizance.bo.InputOrgCognizance;
 import com.goafanti.cognizance.bo.InputOrgFinance;
 import com.goafanti.cognizance.bo.InputOrgHonorDatum;
 import com.goafanti.cognizance.bo.InputOrgHumanResource;
@@ -113,6 +113,8 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserAbility;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
+import com.goafanti.common.utils.HttpUtils;
+import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.copyright.bo.CopyrightInfoDetail;
@@ -181,6 +183,13 @@ public class AdminApiController extends CertifyApiController {
 	private CopyrightInfoService			copyrightInfoService;
 	@Resource
 	private OrgCognizanceProportionService	orgCognizanceProportionService;
+	
+	
+	
+	@Value(value = "${wx.appId}")
+	private String appId;
+	@Value(value = "${wx.appSecret}")
+	private String appSecret;
 
 
 	/**
@@ -3041,5 +3050,24 @@ public class AdminApiController extends CertifyApiController {
 		res.setData(adminService.deleteFrequentContacts(id));
 		return res;
 	}
+	@RequestMapping(value ="/setOpenId" , method = RequestMethod.POST)
+	public Result setOpenId(String code) {
+		Result res =new Result();
+		String url = "https://api.weixin.qq.com/sns/jscode2session?";
+		url=url+"appid="+appId+"&secret="+appSecret+"&js_code="+code+"&grant_type=authorization_code";
+		JSONObject json= HttpUtils.httpGet(url);
+		String openid=json.getString("openid");
+		if (StringUtils.isNotBlank(openid)) {
+			LoggerUtils.debug(getClass(), "获取openid"+openid);
+			Admin a=new Admin();
+			a.setId(TokenManager.getAdminId());
+			a.setOpenId(openid);
+			adminService.updateByPrimaryKey(a);
+			res.data(1);
+		}else {
+			res.getError().add(buildError("openid绑定失败"));
+		}
+		return res;
+	}
 	
 }

+ 172 - 0
src/main/java/com/goafanti/admin/controller/AdminReleaseApiController.java

@@ -0,0 +1,172 @@
+package com.goafanti.admin.controller;
+
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.admin.bo.InputPublicDtails;
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.admin.bo.InputPublicReleaseList;
+import com.goafanti.admin.bo.InputPublicStatistics;
+import com.goafanti.admin.service.PublicReleaseService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.utils.StringUtils;
+
+@RestController
+@RequestMapping(value = "/api/admin/release")
+public class AdminReleaseApiController extends CertifyApiController{
+	
+	@Resource
+	private PublicReleaseService publicReleaseService;
+	
+	/**
+	 * 发起外出申请
+	 * @return
+	 */
+	@RequestMapping(value = "/addPublicRelease", method = RequestMethod.POST)
+	public Result addPublicRelease(InputPublicRelease in){
+		Result res = new Result();
+		if (StringUtils.isBlank(in.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getReleaseStarts())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出时间"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getUserName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
+			return res;
+		}
+		
+		res.setData(publicReleaseService.addPublicRelease(in));
+		return res;
+	}
+	
+	/**
+	 * 修改外出申请
+	 * @return
+	 */
+	@RequestMapping(value = "/updatePublicRelease", method = RequestMethod.POST)
+	public Result updatePublicRelease(InputPublicRelease in){
+		Result res = new Result();
+		if (StringUtils.isBlank(in.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getReleaseStarts())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出时间"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getUserName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
+			return res;
+		}
+		
+		res.setData(publicReleaseService.updatePublicRelease(in));
+		return res;
+	}
+
+	/**
+	 * 外出打卡
+	 * @return
+	 */
+	@RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
+	public Result publicReleaseClockIn(Integer id){
+		Result res =new Result();
+		res.setData(publicReleaseService.pushPublicReleaseClockIn(id));
+		return res;
+	}
+	/**
+	 * 外出申请详情
+	 * @return
+	 */
+	@RequestMapping(value = "/dtails", method = RequestMethod.GET)
+	public Result publicReleaseDtails(String id){
+		Result res =new Result();
+		res.setData(publicReleaseService.publicReleaseDtails(id));
+		return res;
+	}
+	
+	/**
+	 * 外出申请列表
+	 * @return
+	 */
+	@RequestMapping(value = "/listPublicRelease", method = RequestMethod.GET)
+	public Result listPublicRelease(InputPublicReleaseList in){
+		Result res =new Result();
+		res.setData(publicReleaseService.listPublicRelease(in));
+		return res;
+	}
+	
+	/**
+	 * 外出审核
+	 * @return
+	 */
+	@RequestMapping(value = "/examinePublicRelease", method = RequestMethod.POST)
+	public Result examinePublicRelease(Integer id ,Integer status,String remarks,Double duration){
+		Result res =new Result();
+		if (id==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
+			return res;
+		}
+		if (status!=0&&status!=2) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
+			return res;
+		}
+		res.setData(publicReleaseService.pushExaminePublicRelease( id , status, remarks,duration));
+		return res;
+	}
+	
+	/**
+	 * 外出审核日志列表
+	 * @return
+	 */
+	@RequestMapping(value = "/listPublicReleaseLog", method = RequestMethod.GET)
+	public Result listPublicReleaseLog(Integer id){
+		Result res =new Result();
+		res.data(publicReleaseService.listPublicReleaseLog(id));
+		return res;
+	}
+	
+	
+	/**
+	 * 公出统计
+	 * @return
+	 */
+	@RequestMapping(value = "/publicReleaseStatistics", method = RequestMethod.GET)
+	public Result publicReleaseStatistics(InputPublicStatistics in){
+		Result res =new Result();
+		res.data(publicReleaseService.publicReleaseStatistics(in));
+		return res;
+	}
+	
+	
+	/**
+	 * 公出详情列表
+	 * @return
+	 */
+	@RequestMapping(value = "/publicReleaseDtails", method = RequestMethod.GET)
+	public Result publicReleaseListDtails(InputPublicDtails in){
+		Result res =new Result();
+		res.data(publicReleaseService.publicReleaseListDtails(in));
+		return res;
+	}
+	
+	/** 上传图片 **/
+	@RequestMapping(value = "/upload", method = RequestMethod.POST)
+	public Result uploadOrderInvoiceFile(HttpServletRequest req){
+		Result res = new Result();
+		res.setData(handleFile(res, "/publicRelease/", false, req, "publicRelease"));
+		return res;
+	}
+	
+	
+	
+}

+ 36 - 0
src/main/java/com/goafanti/admin/service/PublicReleaseService.java

@@ -0,0 +1,36 @@
+package com.goafanti.admin.service;
+
+import java.util.List;
+
+import com.goafanti.admin.bo.InputPublicDtails;
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.admin.bo.InputPublicReleaseList;
+import com.goafanti.admin.bo.InputPublicStatistics;
+import com.goafanti.admin.bo.OutPublicRelease;
+import com.goafanti.admin.bo.outPublicReleaseLog;
+
+public interface PublicReleaseService {
+
+	int addPublicRelease(InputPublicRelease in);
+
+	Object listPublicRelease(InputPublicReleaseList in);
+
+
+	int pushExaminePublicRelease(Integer id, Integer status, String remarks, Double duration);
+
+
+	List<outPublicReleaseLog> listPublicReleaseLog(Integer id);
+
+	int updatePublicRelease(InputPublicRelease in);
+
+	int pushPublicReleaseClockIn(Integer id);
+
+	OutPublicRelease publicReleaseDtails(String id);
+
+	Object publicReleaseStatistics(InputPublicStatistics in);
+
+	Object publicReleaseListDtails(InputPublicDtails in);
+
+
+
+}

+ 184 - 0
src/main/java/com/goafanti/admin/service/impl/PublicReleaseServiceImpl.java

@@ -0,0 +1,184 @@
+package com.goafanti.admin.service.impl;
+
+import java.text.ParseException;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.admin.bo.InputPublicDtails;
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.admin.bo.InputPublicReleaseList;
+import com.goafanti.admin.bo.InputPublicStatistics;
+import com.goafanti.admin.bo.OutPublicDtails;
+import com.goafanti.admin.bo.OutPublicRelease;
+import com.goafanti.admin.bo.OutPublicReleaseList;
+import com.goafanti.admin.bo.OutPublicStatistics;
+import com.goafanti.admin.bo.outPublicReleaseLog;
+import com.goafanti.admin.service.PublicReleaseService;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.PublicReleaseLogMapper;
+import com.goafanti.common.dao.PublicReleaseMapper;
+import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.PublicRelease;
+import com.goafanti.common.model.PublicReleaseLog;
+import com.goafanti.common.utils.AsyncUtils;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.FollowBusinessBo;
+import com.goafanti.customer.service.CustomerService;
+
+@Service
+public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper> implements PublicReleaseService {
+	@Autowired
+	private PublicReleaseMapper	publicReleaseMapper; 
+	@Autowired
+	private PublicReleaseLogMapper publicReleaseLogMapper;
+	@Autowired
+	private CustomerService customerService;
+	@Autowired
+	private AsyncUtils asyncUtils;
+	@Autowired
+	private AdminMapper adminMapper;
+	
+	@Override
+	public int addPublicRelease(InputPublicRelease in) {
+		Date date =new Date();
+		in.setCreateTime(date);
+		in.setAid(TokenManager.getAdminId());
+		try {
+			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
+			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			throw new BusinessException("转换异常");
+		}
+		publicReleaseMapper.insertSelectiveGetId(in);
+		Admin a=adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
+		String openid=a.getOpenId();
+		openid="ogXpy5RoYqThnr-a8_2e0W7dZuF0";
+		if (openid!=null) {
+			asyncUtils.addWechatNotice(openid, 0,date,a.getName());
+			return 1;
+		}else {
+			//成功但是对方收不到消息
+			return 2;
+		}
+	}
+	
+
+
+	
+	
+	@Override
+	public int updatePublicRelease(InputPublicRelease in) {
+		try {
+			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
+			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			throw new BusinessException("转换异常");
+		}
+		publicReleaseMapper.updateByPrimaryKeySelective(in);
+		return 1;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OutPublicReleaseList> listPublicRelease(InputPublicReleaseList in) {
+		Map<String,Object> map =new HashMap<String, Object>();
+		map.put("type", in.getType()==null?0:in.getType());
+		map.put("aid", TokenManager.getAdminId());
+		return (Pagination<OutPublicReleaseList>) findPage("listPublicRelease", "countPublicRelease", map, in.getPageNo(), in.getPageSize());
+	}
+
+	@Override
+	public int pushExaminePublicRelease(Integer id, Integer status, String remarks,Double duration) {
+		PublicRelease p=new PublicRelease();
+		p.setId(id);
+		p.setStatus(status);
+		if (status==2) {
+			PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
+			p.setDuration(duration);
+		}
+		publicReleaseMapper.updateByPrimaryKeySelective(p);
+		PublicReleaseLog log=new PublicReleaseLog(id,TokenManager.getAdminId(),status,remarks,new Date());
+		publicReleaseLogMapper.insertSelective(log);
+		return 1;
+	}
+	
+	@Override
+	public List<outPublicReleaseLog> listPublicReleaseLog(Integer id) {
+		return publicReleaseLogMapper.listPublicReleaseLog(id);
+	}
+
+	@Override
+	public int pushPublicReleaseClockIn(Integer id) {
+		PublicRelease p=new PublicRelease();
+		PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
+		p.setId(id);
+		p.setClockIn(1);
+		p.setClockInTime(new Date());
+		if (use.getClockIn()==0) {
+			FollowBusinessBo fbb=new FollowBusinessBo();
+			fbb.setUid(use.getUid());
+			fbb.setContactType("0");
+			fbb.setResult(use.getRemarks());
+			fbb.setFollowTime(DateUtils.formatDate(use.getClockInTime(), AFTConstants.YYYYMMDDHHMMSS));
+			String ufid=UUID.randomUUID().toString();
+			p.setUfid(ufid);
+			customerService.addFollow(fbb,ufid);
+		}
+		publicReleaseMapper.updateByPrimaryKeySelective(p);
+		return 1;
+	}
+
+	@Override
+	public OutPublicRelease publicReleaseDtails(String id) {
+		return	publicReleaseMapper.selectByUfid(id); 
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Object publicReleaseStatistics(InputPublicStatistics in) {
+		Map<String,Object> map =new HashMap<String, Object>();
+		if(in.getAid()!=null)map.put("aid", in.getAid());
+		if(in.getDepId()!=null)map.put("depId", in.getDepId());
+		if(in.getClockStart()!=null)map.put("clockStart", in.getClockStart());
+		if(in.getClockEnd()!=null)map.put("clockEnd", in.getClockEnd()+" 23:59:59");
+		if(in.getCreateStart()!=null)map.put("createStart", in.getCreateStart());
+		if(in.getCreateEnd()!=null)map.put("createEnd", in.getCreateEnd()+" 23:59:59");
+		return (Pagination<OutPublicStatistics>) findPage("listPublicStatistics", "countPublicStatistics", map, in.getPageNo(), in.getPageSize());
+	}
+
+
+
+
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Object publicReleaseListDtails(InputPublicDtails in) {
+		Map<String,Object> map =new HashMap<String, Object>();
+		if(in.getAid()!=null)map.put("aid", in.getAid());
+		if(in.getReleaseStart()!=null)map.put("releaseStart", in.getReleaseStart());
+		if(in.getReleaseEnd()!=null)map.put("releaseEnd", in.getReleaseEnd()+" 23:59:59");
+		if(in.getUid()!=null)map.put("uid", in.getUid());
+		if(in.getStatus()!=null)map.put("status", in.getStatus());
+		return (Pagination<OutPublicDtails>) findPage("listPublicDtails", "countPublicDtails", map, in.getPageNo(), in.getPageSize());
+	}
+
+	
+
+	
+
+
+}

+ 1 - 1
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -2,7 +2,7 @@ package com.goafanti.common.constant;
 
 public class AFTConstants {
 	public static final String	YYYYMMDDHHMMSS						= "yyyy-MM-dd HH:mm:ss";
-
+	public static final String	YMDHMS_CHINESE						= "yyyy年MM月dd日 HH:mm:ss";
 	public static final String	YYYYMMDD							= "yyyy-MM-dd";
 
 	public static final String	YYYY								= "yyyy";

+ 10 - 4
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -43,6 +43,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.service.DistrictGlossoryService;
 import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.service.IndustryCategoryService;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.MobileMessageUtils;
@@ -57,7 +58,7 @@ import com.goafanti.user.service.UserService;
 @Controller
 @Scope(value = "prototype")
 @RequestMapping("/open")
-public class PublicController extends BaseController {
+public class PublicController extends CertifyApiController {
 	@Value(value = "${accessKey}")
 	private String					accessKey			= null;
 
@@ -101,10 +102,15 @@ public class PublicController extends BaseController {
 
 	@Resource(name = "passwordUtil")
 	private PasswordUtil			passwordUtil;
-	
-	
-	
 
+	
+	/** 上传图片 **/
+	@RequestMapping(value = "/upload", method = RequestMethod.POST)
+	public Result uploadOrderInvoiceFile(HttpServletRequest req){
+		Result res = new Result();
+		res.setData(handleFile(res, "/publicRelease/", false, req, "publicRelease"));
+		return res;
+	}
 
 	/**
 	 * 获取验证码

+ 2 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -201,5 +201,7 @@ public interface AdminMapper {
 	void getAllDep();
 
 	List<String> getAdminRoleListByAid(String id);
+
+	String selectByOpeid(String aid);
 	
 }

+ 55 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseCountMapper.java

@@ -0,0 +1,55 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PublicReleaseCount;
+
+public interface PublicReleaseCountMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    int insert(PublicReleaseCount record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    int insertSelective(PublicReleaseCount record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    PublicReleaseCount selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    int updateByPrimaryKeySelective(PublicReleaseCount record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    int updateByPrimaryKey(PublicReleaseCount record);
+
+	PublicReleaseCount selectByAid(String aid);
+}

+ 47 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseLogMapper.java

@@ -0,0 +1,47 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.admin.bo.outPublicReleaseLog;
+import com.goafanti.common.model.PublicReleaseLog;
+
+public interface PublicReleaseLogMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int insert(PublicReleaseLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int insertSelective(PublicReleaseLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	PublicReleaseLog selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int updateByPrimaryKeySelective(PublicReleaseLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int updateByPrimaryKey(PublicReleaseLog record);
+
+	List<outPublicReleaseLog> listPublicReleaseLog(Integer id);
+}

+ 53 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java

@@ -0,0 +1,53 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.admin.bo.OutPublicRelease;
+import com.goafanti.admin.bo.OutPublicReleaseList;
+import com.goafanti.common.model.PublicRelease;
+
+public interface PublicReleaseMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	int insert(PublicRelease record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	int insertSelective(PublicRelease record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	PublicRelease selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	int updateByPrimaryKeySelective(PublicRelease record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	int updateByPrimaryKeyWithBLOBs(PublicRelease record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	int updateByPrimaryKey(PublicRelease record);
+
+	void insertSelectiveGetId(PublicRelease in);
+
+	OutPublicRelease selectByUfid(String ufid);
+}

+ 12 - 1
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -23,8 +23,10 @@
     <result column="user_no" jdbcType="VARCHAR" property="userNo" />
     <result column="duty" jdbcType="VARCHAR" property="duty" />
     <result column="district" jdbcType="VARCHAR" property="district" />
+    <result column="open_id" jdbcType="VARCHAR" property="openId" />
     <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
     <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
+    <result column="open_id" jdbcType="VARCHAR" property="openId" />
     <result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
   </resultMap>
   <sql id="Example_Where_Clause">
@@ -103,7 +105,7 @@
     -->
     id, mobile, name, password, email, create_time, number, province, position, superior_id, 
     city, department_id, status, user_no, duty, district, head_portrait_url, contact_mobile, 
-    last_login_time
+    last_login_time,open_id
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.AdminExample" resultMap="BaseResultMap">
     <!--
@@ -475,6 +477,10 @@
       <if test="lastLoginTime != null">
         last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="openId != null">
+        open_id = #{openId},
+      </if>
+      
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -1227,4 +1233,9 @@ select a.id,a.nickname as name,a.source,c.name contacts,c.mobile as contactMobil
 	left join role c on b.rid =c.id 
 	where a.id= #{id}
   </select>
+  
+  <select id="selectByOpeid" resultType="java.lang.String">
+  select b.open_id from admin a left join admin b on a.superior_id =b.id
+	where a.id= #{aid}
+  </select>
 </mapper>

+ 164 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseCountMapper.xml

@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.PublicReleaseCountMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicReleaseCount">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="count" jdbcType="INTEGER" property="count" />
+    <result column="hour" jdbcType="DOUBLE" property="hour" />
+    <result column="no_approved" jdbcType="INTEGER" property="noApproved" />
+    <result column="reject" jdbcType="INTEGER" property="reject" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    id, aid, `count`, `hour`, no_approved, reject, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from public_release_count
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    delete from public_release_count
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PublicReleaseCount">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    insert into public_release_count (id, aid, `count`, 
+      `hour`, no_approved, reject, 
+      create_time)
+    values (#{id,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER}, 
+      #{hour,jdbcType=DOUBLE}, #{noApproved,jdbcType=INTEGER}, #{reject,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicReleaseCount">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    insert into public_release_count
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="count != null">
+        `count`,
+      </if>
+      <if test="hour != null">
+        `hour`,
+      </if>
+      <if test="noApproved != null">
+        no_approved,
+      </if>
+      <if test="reject != null">
+        reject,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="count != null">
+        #{count,jdbcType=INTEGER},
+      </if>
+      <if test="hour != null">
+        #{hour,jdbcType=DOUBLE},
+      </if>
+      <if test="noApproved != null">
+        #{noApproved,jdbcType=INTEGER},
+      </if>
+      <if test="reject != null">
+        #{reject,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicReleaseCount">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    update public_release_count
+    <set>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="count != null">
+        `count` = #{count,jdbcType=INTEGER},
+      </if>
+      <if test="hour != null">
+        `hour` = #{hour,jdbcType=DOUBLE},
+      </if>
+      <if test="noApproved != null">
+        no_approved = #{noApproved,jdbcType=INTEGER},
+      </if>
+      <if test="reject != null">
+        reject = #{reject,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicReleaseCount">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 11:08:16 CST 2021.
+    -->
+    update public_release_count
+    set aid = #{aid,jdbcType=VARCHAR},
+      `count` = #{count,jdbcType=INTEGER},
+      `hour` = #{hour,jdbcType=DOUBLE},
+      no_approved = #{noApproved,jdbcType=INTEGER},
+      reject = #{reject,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="selectByAid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from public_release_count
+    where aid = #{aid}
+  </select>
+</mapper>

+ 152 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseLogMapper.xml

@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.PublicReleaseLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="prid" jdbcType="INTEGER" property="prid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    id, prid, aid, remarks, `status`, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from public_release_log
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    delete from public_release_log
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    insert into public_release_log (id, prid, aid, 
+      remarks, `status`, create_time
+      )
+    values (#{id,jdbcType=INTEGER}, #{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, 
+      #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    insert into public_release_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="prid != null">
+        prid,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="prid != null">
+        #{prid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    update public_release_log
+    <set>
+      <if test="prid != null">
+        prid = #{prid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    update public_release_log
+    set prid = #{prid,jdbcType=INTEGER},
+      aid = #{aid,jdbcType=VARCHAR},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="listPublicReleaseLog" resultType="com.goafanti.admin.bo.outPublicReleaseLog">
+  select a.id,a.aid ,a.prid ,a.remarks ,a.status ,b.name aname,
+	date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes
+	from public_release_log a left join admin b on a.aid =b.id 
+	where a.prid = #{id}
+  </select>
+</mapper>

+ 570 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -0,0 +1,570 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.PublicReleaseMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="release_start" jdbcType="TIMESTAMP" property="releaseStart" />
+    <result column="release_end" jdbcType="TIMESTAMP" property="releaseEnd" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="user_name" jdbcType="VARCHAR" property="userName" />
+    <result column="longitude" jdbcType="VARCHAR" property="longitude" />
+    <result column="latitude" jdbcType="VARCHAR" property="latitude" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="clock_in" jdbcType="INTEGER" property="clockIn" />
+    <result column="clock_in_time" jdbcType="TIMESTAMP" property="clockInTime" />
+    <result column="pid" jdbcType="VARCHAR" property="pid" />
+    <result column="pname" jdbcType="VARCHAR" property="pname" />
+    <result column="ufid" jdbcType="VARCHAR" property="ufid" />
+    <result column="duration" jdbcType="DOUBLE" property="duration" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    <result column="annex_url" jdbcType="LONGVARCHAR" property="annexUrl" />
+    <result column="photo_url" jdbcType="LONGVARCHAR" property="photoUrl" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    id, `uid`, aid, release_start, release_end, remarks, user_name, longitude, latitude, 
+    `status`, create_time, clock_in, clock_in_time, pid, pname, ufid, duration
+  </sql>
+  <sql id="Blob_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    annex_url, photo_url
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from public_release
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    delete from public_release
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    insert into public_release (id, `uid`, aid, 
+      release_start, release_end, remarks, 
+      user_name, longitude, latitude, 
+      `status`, create_time, clock_in, 
+      clock_in_time, pid, pname, 
+      ufid, duration, annex_url, 
+      photo_url)
+    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
+      #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, 
+      #{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{clockIn,jdbcType=INTEGER}, 
+      #{clockInTime,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR}, 
+      #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE}, #{annexUrl,jdbcType=LONGVARCHAR}, 
+      #{photoUrl,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    insert into public_release
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uid != null">
+        `uid`,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="releaseStart != null">
+        release_start,
+      </if>
+      <if test="releaseEnd != null">
+        release_end,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="userName != null">
+        user_name,
+      </if>
+      <if test="longitude != null">
+        longitude,
+      </if>
+      <if test="latitude != null">
+        latitude,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="clockIn != null">
+        clock_in,
+      </if>
+      <if test="clockInTime != null">
+        clock_in_time,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="pname != null">
+        pname,
+      </if>
+      <if test="ufid != null">
+        ufid,
+      </if>
+      <if test="duration != null">
+        duration,
+      </if>
+      <if test="annexUrl != null">
+        annex_url,
+      </if>
+      <if test="photoUrl != null">
+        photo_url,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="clockIn != null">
+        #{clockIn,jdbcType=INTEGER},
+      </if>
+      <if test="clockInTime != null">
+        #{clockInTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="pname != null">
+        #{pname,jdbcType=VARCHAR},
+      </if>
+      <if test="ufid != null">
+        #{ufid,jdbcType=VARCHAR},
+      </if>
+      <if test="duration != null">
+        #{duration,jdbcType=DOUBLE},
+      </if>
+      <if test="annexUrl != null">
+        #{annexUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="photoUrl != null">
+        #{photoUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    update public_release
+    <set>
+      <if test="uid != null">
+        `uid` = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        user_name = #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        longitude = #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        latitude = #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="clockIn != null">
+        clock_in = #{clockIn,jdbcType=INTEGER},
+      </if>
+      <if test="clockInTime != null">
+        clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="pname != null">
+        pname = #{pname,jdbcType=VARCHAR},
+      </if>
+      <if test="ufid != null">
+        ufid = #{ufid,jdbcType=VARCHAR},
+      </if>
+      <if test="duration != null">
+        duration = #{duration,jdbcType=DOUBLE},
+      </if>
+      <if test="annexUrl != null">
+        annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="photoUrl != null">
+        photo_url = #{photoUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    update public_release
+    set `uid` = #{uid,jdbcType=VARCHAR},
+      aid = #{aid,jdbcType=VARCHAR},
+      release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      user_name = #{userName,jdbcType=VARCHAR},
+      longitude = #{longitude,jdbcType=VARCHAR},
+      latitude = #{latitude,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      clock_in = #{clockIn,jdbcType=INTEGER},
+      clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
+      pid = #{pid,jdbcType=VARCHAR},
+      pname = #{pname,jdbcType=VARCHAR},
+      ufid = #{ufid,jdbcType=VARCHAR},
+      duration = #{duration,jdbcType=DOUBLE},
+      annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
+      photo_url = #{photoUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 02 14:39:12 CST 2021.
+    -->
+    update public_release
+    set `uid` = #{uid,jdbcType=VARCHAR},
+      aid = #{aid,jdbcType=VARCHAR},
+      release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      user_name = #{userName,jdbcType=VARCHAR},
+      longitude = #{longitude,jdbcType=VARCHAR},
+      latitude = #{latitude,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      clock_in = #{clockIn,jdbcType=INTEGER},
+      clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
+      pid = #{pid,jdbcType=VARCHAR},
+      pname = #{pname,jdbcType=VARCHAR},
+      ufid = #{ufid,jdbcType=VARCHAR},
+      duration = #{duration,jdbcType=DOUBLE}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+   <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
+   insert into public_release
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uid != null">
+        `uid`,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="releaseStart != null">
+        release_start,
+      </if>
+      <if test="releaseEnd != null">
+        release_end,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="userName != null">
+        user_name,
+      </if>
+      <if test="longitude != null">
+        longitude,
+      </if>
+      <if test="latitude != null">
+        latitude,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="clockIn != null">
+        clock_in,
+      </if>
+      <if test="clockInTime != null">
+        clock_in_time,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="pname != null">
+        pname,
+      </if>
+      <if test="annexUrl != null">
+        annex_url,
+      </if>
+      <if test="photoUrl != null">
+        photo_url,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="clockIn != null">
+        #{clockIn,jdbcType=INTEGER},
+      </if>
+      <if test="clockInTime != null">
+        #{clockInTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="pname != null">
+        #{pname,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        #{annexUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="photoUrl != null">
+        #{photoUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+    <selectKey keyProperty="id" order="AFTER" resultType="int">
+        SELECT LAST_INSERT_ID()
+    </selectKey>
+  </insert>
+  
+  <select id="listPublicRelease" resultType="com.goafanti.admin.bo.OutPublicReleaseList">
+  select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
+date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status
+	from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
+	where 1=1
+	<if test="type==0">
+	and a.aid= #{aid} 
+	</if>
+	<if test="type==1">
+	and c.superior_id = #{aid}
+	</if>
+	order by a.status,a.create_time 
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  <select id="countPublicRelease" resultType="java.lang.Integer">
+  select  count(*)
+	from public_release a  left join admin c on a.aid =c.id
+	where 1=1
+	<if test="type==0">
+	and a.aid= #{aid} 
+	</if>
+	<if test="type==1">
+	and c.superior_id = #{aid}
+	</if>
+  </select>
+  
+  <select id="selectByUfid" resultType="com.goafanti.admin.bo.OutPublicRelease">
+  select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
+date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status
+	from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
+	where a.ufid= #{id}
+  </select>
+  
+  <select id="listPublicStatistics" resultType="com.goafanti.admin.bo.OutPublicStatistics">
+  	select if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,b.name 
+  	,sum(a.duration)duration
+    from  public_release a left join admin b on a.aid =b.id
+	where 1=1
+	<if test="aid != null">
+	and a.aid= #{aid}
+	</if>
+	<if test="clockStart != null and clockEnd != null">
+	and a.clock_in_time  between #{clockStart} and #{clockEnd}
+	</if>
+	<if test="createStart != null and createEnd !=null">
+	and a.create_time  between #{createStart} and #{createEnd}
+	</if>
+	<if test="depId != null">
+	and b.department_id = #{depId}
+	</if>
+	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  
+  <select id="countPublicStatistics" resultType="java.lang.Integer">
+  	select count(*)
+    from  public_release a left join admin b on a.aid =b.id
+	where 1=1
+	<if test="aid != null">
+	and a.aid= #{aid}
+	</if>
+	<if test="clockStart != null and clockEnd != null">
+	and a.clock_in_time  between #{clockStart} and #{clockEnd}
+	</if>
+	<if test="createStart != null and createEnd !=null">
+	and a.create_time  between #{createStart} and #{createEnd}
+	</if>
+	<if test="depId != null">
+	and b.department_id = #{depId}
+	</if>
+  </select>
+  
+  <select id="listPublicDtails" resultType="com.goafanti.admin.bo.OutPublicDtails">
+  select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,
+	date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds
+	from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
+	where 1=1
+	<if test="aid != null">
+	and a.aid= #{aid}
+	</if>
+	<if test="uid != null">
+	and a.uid = #{uid}
+	</if>
+	<if test="releaseStart != null and releaseEnd != null">
+	and (a.release_start  between #{releaseStart} and #{releaseEnd} or a.release_end  between #{releaseStart} and #{releaseEnd})
+	</if>
+	<if test="status != null">
+	and a.status = #{status}
+	</if>
+	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id="countPublicDtails" resultType="java.lang.Integer">
+  select count(*)
+	from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
+	where 1=1
+	<if test="aid != null">
+	and a.aid= #{aid}
+	</if>
+	<if test="uid != null">
+	and a.uid = #{uid}
+	</if>
+	<if test="releaseStart != null and releaseEnd != null">
+	and (a.release_start  between #{releaseStart} and #{releaseEnd} or a.release_end  between #{releaseStart} and #{releaseEnd})
+	</if>
+	<if test="status != null">
+	and a.status = #{status}
+	</if>
+  </select>
+  
+</mapper>

+ 4 - 4
src/main/java/com/goafanti/common/mapper/ThirdPartyCompanyMapper.xml

@@ -545,10 +545,10 @@
 		left join t_order_mid d on b.order_no=d.order_no left join t_task_mid f on a.tid=f.tid
 		where 1=1
 		<if test="lvl==0">
-		and c.finance_id= #{aid}
+		and d.finance_id= #{aid}
 		</if>
 		<if test="lvl==1">
-		and c.finance_id in (select id from admin where superior_id= #{aid} )
+		and d.finance_id in (select id from admin where superior_id= #{aid} )
 		</if>
 		<if test="lvl==3">
 		and b.task_receiver= #{aid}
@@ -592,10 +592,10 @@
 		left join t_order_mid d on b.order_no=d.order_no 
 		where 1=1
 		<if test="lvl==0">
-		and c.finance_id= #{aid}
+		and d.finance_id= #{aid}
 		</if>
 		<if test="lvl==1">
-		and c.finance_id in (select id from admin where superior_id= #{aid} )
+		and d.finance_id in (select id from admin where superior_id= #{aid} )
 		</if>
 		<if test="lvl==3">
 		and b.task_receiver= #{aid}

+ 11 - 2
src/main/java/com/goafanti/common/model/Admin.java

@@ -77,7 +77,6 @@ public class Admin extends BaseModel implements AftUser {
 	/**
 	 * 用户编号
 	 */
-	@SuppressWarnings("unused")
 	private String 				userNo;
 	/**
 	 * 职务
@@ -93,6 +92,8 @@ public class Admin extends BaseModel implements AftUser {
 	 * 用户头像
 	 */
 	private String 				headPortraitUrl;	
+	
+	private String	openId;
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column admin.contact_mobile
@@ -159,7 +160,7 @@ public class Admin extends BaseModel implements AftUser {
 	}
 
 	public String getUserNo() {
-		return "";
+		return userNo;
 	}
 
 	public void setUserNo(String userNo) {
@@ -304,4 +305,12 @@ public class Admin extends BaseModel implements AftUser {
 	public void setLastLoginTime(Date lastLoginTime) {
 		this.lastLoginTime = lastLoginTime;
 	}
+
+	public String getOpenId() {
+		return openId;
+	}
+
+	public void setOpenId(String openId) {
+		this.openId = openId;
+	}
 }

+ 484 - 0
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -0,0 +1,484 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class PublicRelease implements Serializable {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.id
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.uid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String uid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.aid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String aid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.release_start
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Date releaseStart;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.release_end
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Date releaseEnd;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.remarks
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.user_name
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String userName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.longitude
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String longitude;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.latitude
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String latitude;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.status
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Integer status;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.create_time
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.clock_in
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Integer clockIn;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.clock_in_time
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Date clockInTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.pid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String pid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.pname
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String pname;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.ufid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String ufid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.duration
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private Double duration;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.annex_url
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String annexUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release.photo_url
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private String photoUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.id
+	 * @return  the value of public_release.id
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.id
+	 * @param id  the value for public_release.id
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.uid
+	 * @return  the value of public_release.uid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getUid() {
+		return uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.uid
+	 * @param uid  the value for public_release.uid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setUid(String uid) {
+		this.uid = uid == null ? null : uid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.aid
+	 * @return  the value of public_release.aid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getAid() {
+		return aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.aid
+	 * @param aid  the value for public_release.aid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setAid(String aid) {
+		this.aid = aid == null ? null : aid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.release_start
+	 * @return  the value of public_release.release_start
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Date getReleaseStart() {
+		return releaseStart;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.release_start
+	 * @param releaseStart  the value for public_release.release_start
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setReleaseStart(Date releaseStart) {
+		this.releaseStart = releaseStart;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.release_end
+	 * @return  the value of public_release.release_end
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Date getReleaseEnd() {
+		return releaseEnd;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.release_end
+	 * @param releaseEnd  the value for public_release.release_end
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setReleaseEnd(Date releaseEnd) {
+		this.releaseEnd = releaseEnd;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.remarks
+	 * @return  the value of public_release.remarks
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getRemarks() {
+		return remarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.remarks
+	 * @param remarks  the value for public_release.remarks
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setRemarks(String remarks) {
+		this.remarks = remarks == null ? null : remarks.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.user_name
+	 * @return  the value of public_release.user_name
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getUserName() {
+		return userName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.user_name
+	 * @param userName  the value for public_release.user_name
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setUserName(String userName) {
+		this.userName = userName == null ? null : userName.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.longitude
+	 * @return  the value of public_release.longitude
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getLongitude() {
+		return longitude;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.longitude
+	 * @param longitude  the value for public_release.longitude
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setLongitude(String longitude) {
+		this.longitude = longitude == null ? null : longitude.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.latitude
+	 * @return  the value of public_release.latitude
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getLatitude() {
+		return latitude;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.latitude
+	 * @param latitude  the value for public_release.latitude
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setLatitude(String latitude) {
+		this.latitude = latitude == null ? null : latitude.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.status
+	 * @return  the value of public_release.status
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Integer getStatus() {
+		return status;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.status
+	 * @param status  the value for public_release.status
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.create_time
+	 * @return  the value of public_release.create_time
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.create_time
+	 * @param createTime  the value for public_release.create_time
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.clock_in
+	 * @return  the value of public_release.clock_in
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Integer getClockIn() {
+		return clockIn;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.clock_in
+	 * @param clockIn  the value for public_release.clock_in
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setClockIn(Integer clockIn) {
+		this.clockIn = clockIn;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.clock_in_time
+	 * @return  the value of public_release.clock_in_time
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Date getClockInTime() {
+		return clockInTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.clock_in_time
+	 * @param clockInTime  the value for public_release.clock_in_time
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setClockInTime(Date clockInTime) {
+		this.clockInTime = clockInTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.pid
+	 * @return  the value of public_release.pid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getPid() {
+		return pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.pid
+	 * @param pid  the value for public_release.pid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setPid(String pid) {
+		this.pid = pid == null ? null : pid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.pname
+	 * @return  the value of public_release.pname
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getPname() {
+		return pname;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.pname
+	 * @param pname  the value for public_release.pname
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setPname(String pname) {
+		this.pname = pname == null ? null : pname.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.ufid
+	 * @return  the value of public_release.ufid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getUfid() {
+		return ufid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.ufid
+	 * @param ufid  the value for public_release.ufid
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setUfid(String ufid) {
+		this.ufid = ufid == null ? null : ufid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.duration
+	 * @return  the value of public_release.duration
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public Double getDuration() {
+		return duration;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.duration
+	 * @param duration  the value for public_release.duration
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setDuration(Double duration) {
+		this.duration = duration;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.annex_url
+	 * @return  the value of public_release.annex_url
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getAnnexUrl() {
+		return annexUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.annex_url
+	 * @param annexUrl  the value for public_release.annex_url
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setAnnexUrl(String annexUrl) {
+		this.annexUrl = annexUrl == null ? null : annexUrl.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release.photo_url
+	 * @return  the value of public_release.photo_url
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public String getPhotoUrl() {
+		return photoUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release.photo_url
+	 * @param photoUrl  the value for public_release.photo_url
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	public void setPhotoUrl(String photoUrl) {
+		this.photoUrl = photoUrl == null ? null : photoUrl.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release
+	 * @mbg.generated  Wed Jun 02 14:39:12 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", uid=").append(uid);
+		sb.append(", aid=").append(aid);
+		sb.append(", releaseStart=").append(releaseStart);
+		sb.append(", releaseEnd=").append(releaseEnd);
+		sb.append(", remarks=").append(remarks);
+		sb.append(", userName=").append(userName);
+		sb.append(", longitude=").append(longitude);
+		sb.append(", latitude=").append(latitude);
+		sb.append(", status=").append(status);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", clockIn=").append(clockIn);
+		sb.append(", clockInTime=").append(clockInTime);
+		sb.append(", pid=").append(pid);
+		sb.append(", pname=").append(pname);
+		sb.append(", ufid=").append(ufid);
+		sb.append(", duration=").append(duration);
+		sb.append(", annexUrl=").append(annexUrl);
+		sb.append(", photoUrl=").append(photoUrl);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+}

+ 269 - 0
src/main/java/com/goafanti/common/model/PublicReleaseCount.java

@@ -0,0 +1,269 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class PublicReleaseCount implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.id
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.aid
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private String aid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private Integer count;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.hour
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private Double hour;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.no_approved
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private Integer noApproved;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.reject
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private Integer reject;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release_count.create_time
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private Date createTime;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.id
+     *
+     * @return the value of public_release_count.id
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.id
+     *
+     * @param id the value for public_release_count.id
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.aid
+     *
+     * @return the value of public_release_count.aid
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public String getAid() {
+        return aid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.aid
+     *
+     * @param aid the value for public_release_count.aid
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setAid(String aid) {
+        this.aid = aid == null ? null : aid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.count
+     *
+     * @return the value of public_release_count.count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public Integer getCount() {
+        return count;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.count
+     *
+     * @param count the value for public_release_count.count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.hour
+     *
+     * @return the value of public_release_count.hour
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public Double getHour() {
+        return hour;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.hour
+     *
+     * @param hour the value for public_release_count.hour
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setHour(Double hour) {
+        this.hour = hour;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.no_approved
+     *
+     * @return the value of public_release_count.no_approved
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public Integer getNoApproved() {
+        return noApproved;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.no_approved
+     *
+     * @param noApproved the value for public_release_count.no_approved
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setNoApproved(Integer noApproved) {
+        this.noApproved = noApproved;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.reject
+     *
+     * @return the value of public_release_count.reject
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public Integer getReject() {
+        return reject;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.reject
+     *
+     * @param reject the value for public_release_count.reject
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setReject(Integer reject) {
+        this.reject = reject;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release_count.create_time
+     *
+     * @return the value of public_release_count.create_time
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release_count.create_time
+     *
+     * @param createTime the value for public_release_count.create_time
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release_count
+     *
+     * @mbg.generated Wed Jun 02 11:08:16 CST 2021
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", aid=").append(aid);
+        sb.append(", count=").append(count);
+        sb.append(", hour=").append(hour);
+        sb.append(", noApproved=").append(noApproved);
+        sb.append(", reject=").append(reject);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 166 - 0
src/main/java/com/goafanti/common/model/PublicReleaseLog.java

@@ -0,0 +1,166 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class PublicReleaseLog implements Serializable {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.id
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.prid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Integer prid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.aid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private String aid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.remarks
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.status
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Integer status;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.create_time
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.id
+	 * @return  the value of public_release_log.id
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Integer getId() {
+		return id;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.id
+	 * @param id  the value for public_release_log.id
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.prid
+	 * @return  the value of public_release_log.prid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Integer getPrid() {
+		return prid;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.prid
+	 * @param prid  the value for public_release_log.prid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setPrid(Integer prid) {
+		this.prid = prid;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.aid
+	 * @return  the value of public_release_log.aid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public String getAid() {
+		return aid;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.aid
+	 * @param aid  the value for public_release_log.aid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setAid(String aid) {
+		this.aid = aid == null ? null : aid.trim();
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.remarks
+	 * @return  the value of public_release_log.remarks
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public String getRemarks() {
+		return remarks;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.remarks
+	 * @param remarks  the value for public_release_log.remarks
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setRemarks(String remarks) {
+		this.remarks = remarks == null ? null : remarks.trim();
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.status
+	 * @return  the value of public_release_log.status
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Integer getStatus() {
+		return status;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.status
+	 * @param status  the value for public_release_log.status
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.create_time
+	 * @return  the value of public_release_log.create_time
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.create_time
+	 * @param createTime  the value for public_release_log.create_time
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", prid=").append(prid);
+		sb.append(", aid=").append(aid);
+		sb.append(", remarks=").append(remarks);
+		sb.append(", status=").append(status);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+	public PublicReleaseLog() {}
+    public PublicReleaseLog(Integer id,String aid,Integer status, String remarks, Date date) {
+		this.prid=id;
+		this.aid=aid;
+		this.status=status;
+		this.remarks=remarks;
+		this.createTime=date;
+	}
+}

+ 90 - 0
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -1,24 +1,42 @@
 package com.goafanti.common.utils;
 
 import java.io.UnsupportedEncodingException;
+import java.net.URL;
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.mail.MessagingException;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
+import com.alibaba.fastjson.JSONObject;
 import com.goafanti.common.bo.EmailBo;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.enums.NoticeTypes;
+import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Notice;
+import com.goafanti.core.shiro.token.TokenManager;
 
 @Component
 @Async
 public class AsyncUtils {
 	@Autowired
 	private NoticeMapper noticeMapper;
+	@Value(value = "${wx.appId}")
+	private String appId;
+	@Value(value = "${wx.appSecret}")
+	private String appSecret;
+	//待审核通知
+	private static final String sptz="j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I";
+	//审核结通知
+	private static final String jgtz="pWia-KJPFwDM8ReDu_BOa2_42G7W2hXB16sUDbSxpcM";
+	private static  String send_url="https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN";
 
 	
 	public void patentSend(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
@@ -43,4 +61,76 @@ public class AsyncUtils {
 		noticeMapper.insertBatch(list);
 		
 	}
+
+
+	/**
+	 * 
+	 * @param openid
+	 * @param type 0申请 1通过 2驳回
+	 * @param string 
+	 * @param date 
+	 */
+	public void addWechatNotice(String openid ,Integer type, Date date, String aname) {
+		Map<String, Object> map=new HashMap<String, Object>();
+		String accessToken=getAccessToken();
+		String url=send_url.replace("ACCESS_TOKEN", accessToken);
+		System.out.println(url);
+		map.put("access_token", accessToken);
+		map.put("touser", openid);
+		Map<String, Object> we=new HashMap<String, Object>();
+		if (type==0) {
+			map.put("template_id", sptz);
+			Map<String, Object> v1=new HashMap<String, Object>();
+			String str=DateUtils.formatDate(date, AFTConstants.YMDHMS_CHINESE);
+			v1.put("value",str);
+			we.put("date2", v1);
+			Map<String, Object> v2=new HashMap<String, Object>();
+			v2.put("value", aname);
+			we.put("name5", v2);
+			Map<String, Object> v3=new HashMap<String, Object>();
+			v3.put("value", "我是一个备注");
+			we.put("thing8", v3);
+		}else if (type==1){
+			map.put("template_id", jgtz);
+			we.put("thing17", new HashMap<>().put("value", "通过"));
+			we.put("thing25", new HashMap<>().put("value", "您申请的外出已通过!"));
+		}else if (type==2){
+			map.put("template_id", jgtz);
+			we.put("thing17", new HashMap<>().put("value", "通过"));
+			we.put("thing25", new HashMap<>().put("value", "您申请的外出已驳回!"));
+		}
+		map.put("data", we);
+		System.out.println(JSONObject.toJSON(map));
+		JSONObject json=HttpUtils.httpPost(url, map);
+		System.out.println(JSONObject.toJSONString(json));
+		
+	}
+	
+
+	
+	  public  String getAccessToken() {
+	    	String access_token=(String) TokenManager.getVal2Session("access_token");
+	    	String expires_in= (String) TokenManager.getVal2Session("expires_in");
+	    	if (access_token!=null&&expires_in!=null) {
+	    		expires_in=expires_in+7200;
+	    		if (new Date().getTime()<Long.valueOf(expires_in)) {
+	    			return access_token;
+				}
+			}
+				String url = String.format(
+						"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", appId,
+						appSecret);
+				JSONObject js = HttpUtils.httpGet(url);
+				String errcode =js.getString("errcode");
+				if (errcode!=null) {
+					throw new  BusinessException("获取AccessToken失败!");
+				}else {
+					LoggerUtils.debug(AsyncUtils.class,"获取AccessToken成功,accesstoken="+js.getString("access_token"));
+				}
+				access_token = js.getString("access_token");
+				expires_in = js.getString("expires_in");
+				TokenManager.setVal2Session("access_token", access_token);
+				TokenManager.setVal2Session("expires_in", expires_in);
+			return access_token;
+	    }
 }

+ 2 - 0
src/main/java/com/goafanti/common/utils/DateUtils.java

@@ -7,6 +7,7 @@ import java.util.Date;
 
 
 import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.PublicRelease;
 
 public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
 
@@ -482,4 +483,5 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
     }
 
 
+	
 }

+ 83 - 0
src/main/java/com/goafanti/common/utils/HttpUtils.java

@@ -0,0 +1,83 @@
+package com.goafanti.common.utils;
+
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.Map;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ParseException;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+public class HttpUtils {
+	
+	
+	
+	 public static JSONObject httpGet(String url) {
+			JSONObject jsonResult = null;
+			try {
+			HttpClient client = HttpClientBuilder.create().build();//获取DefaultHttpClient请求
+			HttpGet request = new HttpGet(url);
+			HttpResponse response = client.execute(request);
+			if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+			String strResult = EntityUtils.toString(response.getEntity(),"UTF-8");//此处设定编码格式
+			jsonResult = JSON.parseObject(strResult);
+			} else {
+			LoggerUtils.error(HttpUtils.class,"HttpStatus异常");
+			}
+			} catch (IOException e) {
+			e.printStackTrace();
+			}
+			return jsonResult;
+		}
+	    
+		 /**
+		  *  
+		  * @param url 地址
+		  * @param map 参数
+		  * @return
+		  */
+		public static JSONObject httpPost(String url,Map<String, Object>map){
+			HttpClient httpClient = HttpClientBuilder.create().build();
+			HttpPost httpPost = new HttpPost(url);
+			httpPost.addHeader("Content-type", "application/json");
+			httpPost.setHeader("Accept", "application/json");
+			httpPost.setEntity(new StringEntity(JSON.toJSONString(map), Charset.forName("UTF-8")));
+			HttpResponse response = null;
+			try {
+				response = httpClient.execute(httpPost);
+			if (null == response || response.getStatusLine() == null) {
+				throw new Exception("Post Request For Url[{}] is not ok. Response is null");
+			} else if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
+				throw new Exception("Post Request For Url[{}] is not ok. Response Status Code is {"+response.getStatusLine().getStatusCode()+"}");
+			}
+			} catch (ClientProtocolException e) {
+				e.printStackTrace();
+			} catch (IOException e) {
+				e.printStackTrace();
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			String resultString=null;
+			try {
+				resultString = EntityUtils.toString(response.getEntity());
+			} catch (ParseException | IOException e) {
+				e.printStackTrace();
+			}
+			JSONObject jsonObj = JSONObject.parseObject(resultString);
+			return jsonObj;
+			}
+
+
+		
+
+}

+ 3 - 2
src/main/java/com/goafanti/core/shiro/session/CustomSessionManager.java

@@ -31,12 +31,13 @@ public class CustomSessionManager extends DefaultWebSessionManager {
 	@Override
 	protected Serializable getSessionId(ServletRequest request, ServletResponse response) {
 		String sid = request.getParameter("token");
+		HttpServletRequest rq = (HttpServletRequest) request;
+		HttpServletResponse rs = (HttpServletResponse) response;
+		if(sid==null)sid=rq.getHeader("token");
 		System.out.println("请求 token=============="+sid);
 		if (StringUtils.isNotBlank(sid)) {
 			// 是否将sid保存到cookie,浏览器模式下使用此参数。
 			if (WebUtils.isTrue(request, "AFT_SID")) {
-				HttpServletRequest rq = (HttpServletRequest) request;
-				HttpServletResponse rs = (HttpServletResponse) response;
 				Cookie template = getSessionIdCookie();
 				Cookie cookie = new SimpleCookie(template);
 				cookie.setValue(sid);

+ 2 - 0
src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java

@@ -1,5 +1,6 @@
 package com.goafanti.customer.bo;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -97,4 +98,5 @@ public class FollowBusinessBo {
 	public void setUserBusinessList(List<BusinessListBo> userBusinessList) {
 		this.userBusinessList = userBusinessList;
 	}
+	
 }

+ 1 - 1
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -450,7 +450,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		fbb.setResult(result);
 		fbb.setFollowTime(followTime);
 		fbb.setUserBusinessList(list);	
-		customerService.addFollow(fbb);
+		customerService.addFollow(fbb,null);
 		return res;
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -211,7 +211,7 @@ public interface CustomerService {
 	 * 添加拜访记录
 	 * @param fbb
 	 */
-	int addFollow(FollowBusinessBo fbb) throws BusinessException;
+	int addFollow(FollowBusinessBo fbb,String ufid) throws BusinessException;
 	
 	/**
 	 * 查询拜访记录详情

+ 3 - 3
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -632,11 +632,11 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	@Transactional
-	public int addFollow(FollowBusinessBo fbb) throws BusinessException {
+	public int addFollow(FollowBusinessBo fbb,String ufid) throws BusinessException {
 		// 更新跟进记录表
 		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
 		UserFollow userFollow = new UserFollow();
-		String followId = UUID.randomUUID().toString();
+		String followId = ufid==null?UUID.randomUUID().toString():ufid;
 		userFollow.setId(followId);
 		userFollow.setAid(TokenManager.getAdminId());
 		userFollow.setContactType(Integer.parseInt(fbb.getContactType()));
@@ -655,7 +655,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		// 判断是跟进还是签单
 		int x = 0;
 		// 检查客户锁定情况
-		if (fbb.getUserBusinessList().size() > 0) {
+		if (fbb.getUserBusinessList()!=null&&fbb.getUserBusinessList().size() > 0) {
 			boolean isUserOwner = false;
 			List<LockingReleaseBo> userLockedList = userMapper.selectLockedProject(fbb.getUid(),
 					TokenManager.getAdminId(), null, 0, UserLockReleaseStatus.LOCKED.getCode());

+ 10 - 6
src/main/resources/props/config_local.properties

@@ -1,13 +1,13 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=123456
-#测试
-jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
-jdbc.password=aftdev
+jdbc.password=123456
+#测试
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=root
+#jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
 #\u521d\u59cb\u8fde\u63a5\u6570
@@ -67,6 +67,10 @@ avatar.upload.host=//sb.jishutao.com/upload
 #static.host=//172.16.0.253/1.1.74
 #avatar.host=//172.16.0.253
 
+wx.appId=wxff2f5720ed7d7f63
+wx.appSecret=081744369d42405be58fe37f892631f7
+
+
 avatar.host=//static.jishutao.com
 static.host=//static.jishutao.com/1.1.74

+ 3 - 0
src/main/resources/props/config_test.properties

@@ -64,6 +64,9 @@ portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload
 
+wx.appId=wxff2f5720ed7d7f63
+wx.appSecret=9c9912bdd381f2a412a23dd560c2f77e
+
 upload.path=/data/static/public/upload
 upload.private.path=/data/static/private/upload