Commit af8cac99 by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!458
parents 843613fd b6d6b829
...@@ -12,6 +12,7 @@ import java.util.List; ...@@ -12,6 +12,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -30,8 +31,8 @@ public class SafeVerify { ...@@ -30,8 +31,8 @@ public class SafeVerify {
String rbody2 = "{\"action\":\"SIGN_FLOW_UPDATE\",\"flowId\":\"1e49e34bdc5f4550a8fd6d7922c68101\",\"accountId\":\"1b6d7e255140443fa65287a6ff74149d\",\"authorizedAccountId\":\"1b6d7e255140443fa65287a6ff74149d\",\"order\":1,\"signTime\":\"2020-05-20 10:01:06\",\"signResult\":2,\"resultDescription\":\"签署完成\",\"timestamp\":1589940066702,\"thirdPartyUserId\":\"431003199610102831\"}"; String rbody2 = "{\"action\":\"SIGN_FLOW_UPDATE\",\"flowId\":\"1e49e34bdc5f4550a8fd6d7922c68101\",\"accountId\":\"1b6d7e255140443fa65287a6ff74149d\",\"authorizedAccountId\":\"1b6d7e255140443fa65287a6ff74149d\",\"order\":1,\"signTime\":\"2020-05-20 10:01:06\",\"signResult\":2,\"resultDescription\":\"签署完成\",\"timestamp\":1589940066702,\"thirdPartyUserId\":\"431003199610102831\"}";
JSONObject jsonBody = new JSONObject(rbody); JSONObject jsonBody = new JSONObject(rbody);
JSONObject jsonBody2 = new JSONObject(rbody2); JSONObject jsonBody2 = new JSONObject(rbody2);
System.err.println(jsonBody.getStr("action")); // System.err.println(jsonBody.getStr("action"));
System.err.println(jsonBody2.getStr("action")); // System.err.println(jsonBody2.getStr("action"));
} }
public String checkPass(HttpServletRequest request, String appSecret) throws UnsupportedEncodingException { public String checkPass(HttpServletRequest request, String appSecret) throws UnsupportedEncodingException {
...@@ -44,8 +45,8 @@ public class SafeVerify { ...@@ -44,8 +45,8 @@ public class SafeVerify {
// 3. 获取body的数据 // 3. 获取body的数据
String rbody = getRequestBody(request, "UTF-8"); String rbody = getRequestBody(request, "UTF-8");
System.err.println("requestQuery:" + requestQuery); Logoutput("requestQuery:" + requestQuery);
System.err.println("rbody:" + rbody); Logoutput("rbody:" + rbody);
// 3.5 保存回调结果到数据库 // 3.5 保存回调结果到数据库
JSONObject jsonBody = new JSONObject(rbody); JSONObject jsonBody = new JSONObject(rbody);
...@@ -99,14 +100,14 @@ public class SafeVerify { ...@@ -99,14 +100,14 @@ public class SafeVerify {
// 4、按照规则进行加密 // 4、按照规则进行加密
String signdata = timestampHeader + requestQuery + rbody; String signdata = timestampHeader + requestQuery + rbody;
String mySignature = DigestHelper.getSignature(signdata, appSecret, "HmacSHA256", "UTF-8"); String mySignature = DigestHelper.getSignature(signdata, appSecret, "HmacSHA256", "UTF-8");
System.out.println("加密出来的签名值:----------->>>>>>" + mySignature); Logoutput("加密出来的签名值:----------->>>>>>" + mySignature);
System.out.println("header里面的签名值:---------->>>>>>" + signture); Logoutput("header里面的签名值:---------->>>>>>" + signture);
if (mySignature.equals(signture)) { if (mySignature.equals(signture)) {
System.out.println("校验通过"); Logoutput("校验通过");
return "true"; return "true";
} else { } else {
System.out.println("校验失败"); Logoutput("校验失败");
return "false"; return "false";
} }
...@@ -166,8 +167,23 @@ public class SafeVerify { ...@@ -166,8 +167,23 @@ public class SafeVerify {
String value = request.getParameter(key); String value = request.getParameter(key);
requestQuery += value == null ? "" : value; requestQuery += value == null ? "" : value;
} }
System.out.println("获取的query请求字符串是:------》》》" + requestQuery); Logoutput("获取的query请求字符串是:------》》》" + requestQuery);
return requestQuery; return requestQuery;
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -59,7 +59,7 @@ public class WxCallBackController { ...@@ -59,7 +59,7 @@ public class WxCallBackController {
@GetMapping(value = "/t") @GetMapping(value = "/t")
public String testEnv() { public String testEnv() {
System.out.println(env); // System.out.println(env);
return env; return env;
} }
......
...@@ -343,7 +343,7 @@ public class LoginController { ...@@ -343,7 +343,7 @@ public class LoginController {
* "ERROR_INVALID_LIB_NAME"); // * "ERROR_INVALID_LIB_NAME"); //
* response.setContentType("application/octet-stream"); // * response.setContentType("application/octet-stream"); //
* response.addHeader("Content-Length", "0"); // response.flushBuffer(); * response.addHeader("Content-Length", "0"); // response.flushBuffer();
* System.out.println(111); } * Logoutput(111); }
*/ */
@PostMapping(value = "/updatePwd") @PostMapping(value = "/updatePwd")
...@@ -650,9 +650,9 @@ public class LoginController { ...@@ -650,9 +650,9 @@ public class LoginController {
if (rullist.size() > 0) { if (rullist.size() > 0) {
kqglassoleaverulesmapper.insertleaverulesList(rullist); kqglassoleaverulesmapper.insertleaverulesList(rullist);
} }
System.out.println("操作成功!"); Logoutput("操作成功!");
} else { } else {
System.out.println("重复初始化数据!"); Logoutput("重复初始化数据!");
} }
//建立初始化的加班规则 //建立初始化的加班规则
...@@ -926,7 +926,7 @@ public class LoginController { ...@@ -926,7 +926,7 @@ public class LoginController {
hashMap.put("result", "true"); hashMap.put("result", "true");
String result = new cn.hutool.json.JSONObject(hashMap).toString();//转化为json格式 String result = new cn.hutool.json.JSONObject(hashMap).toString();//转化为json格式
System.out.println("全部信息="+result);//打印json串 Logoutput("全部信息="+result);//打印json串
ZzglCodeLogin.builder().keyCode(key).vlaue(timercode).datatime(new Date().getTime()).build().insert(); ZzglCodeLogin.builder().keyCode(key).vlaue(timercode).datatime(new Date().getTime()).build().insert();
ZzglCodeLogin.builder().keyCode(key+"_code").vlaue("1").datatime(new Date().getTime()).build().insert(); ZzglCodeLogin.builder().keyCode(key+"_code").vlaue("1").datatime(new Date().getTime()).build().insert();
...@@ -1094,4 +1094,17 @@ public class LoginController { ...@@ -1094,4 +1094,17 @@ public class LoginController {
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -503,12 +503,16 @@ public class CrmController { ...@@ -503,12 +503,16 @@ public class CrmController {
// 归属我的客户 // 归属我的客户
private List<CrmClientData> getMyCilent(Integer empNum, Integer orgCode, Integer groupId, Integer status, private List<CrmClientData> getMyCilent(Integer empNum, Integer orgCode, Integer groupId, Integer status,
String like) { String like,String startCreateTime, String endCreateTime, String startFollowTime, String endFollowTime) {
return CrmClientData.builder().build() return CrmClientData.builder().build()
.selectList(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode, orgCode) .selectList(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode, orgCode)
.eq(CrmClientData::getBelongUser, empNum) .eq(CrmClientData::getBelongUser, empNum)
.eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId) .eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId)
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status) .eq(status != null && status >= 0, CrmClientData::getClientStatus, status)
.ge(StringUtils.isNotBlank(startCreateTime), CrmClientData::getCreateTime, startCreateTime)
.le(StringUtils.isNotBlank(endCreateTime), CrmClientData::getCreateTime, endCreateTime)
.ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getCreateTime, startFollowTime)
.le(StringUtils.isNotBlank(endFollowTime), CrmClientData::getCreateTime, endFollowTime)
.like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or() .like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or()
.like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like) .like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like)
.orderByDesc(CrmClientData::getCreateTime)); .orderByDesc(CrmClientData::getCreateTime));
...@@ -538,7 +542,7 @@ public class CrmController { ...@@ -538,7 +542,7 @@ public class CrmController {
// 我的全部客户 // 我的全部客户
private List<CrmClientData> getMyTotalCilent(Integer empNum, Integer orgCode, Integer groupId, Integer status, private List<CrmClientData> getMyTotalCilent(Integer empNum, Integer orgCode, Integer groupId, Integer status,
String like) { String like) {
return CheckUtil.distinct(getMyCilent(empNum, orgCode, groupId, status, like), return CheckUtil.distinct(getMyCilent(empNum, orgCode, groupId, status, like,null,null,null,null),
getMyAssociateCilent(empNum, orgCode, groupId, status, like), true); getMyAssociateCilent(empNum, orgCode, groupId, status, like), true);
} }
...@@ -570,17 +574,21 @@ public class CrmController { ...@@ -570,17 +574,21 @@ public class CrmController {
@RequestParam(required = false) Integer groupId, @RequestParam(required = false) Integer status, @RequestParam(required = false) Integer groupId, @RequestParam(required = false) Integer status,
@RequestParam(required = false) String like, @RequestParam(required = false) String like,
@RequestParam(required = false, defaultValue = "1") int pageNumber, @RequestParam(required = false, defaultValue = "1") int pageNumber,
@RequestParam(required = false, defaultValue = "10") int pageSize) { @RequestParam(required = false, defaultValue = "10") int pageSize,
@RequestParam(required = false) String startCreateTime,
@RequestParam(required = false) String endCreateTime,
@RequestParam(required = false) String startFollowTime,
@RequestParam(required = false) String endFollowTime) {
Integer empNum = getEmpNum(userBean); Integer empNum = getEmpNum(userBean);
Integer orgCode = getOrgCode(userBean); Integer orgCode = getOrgCode(userBean);
List<CrmClientData> crmClientDatas = null; List<CrmClientData> crmClientDatas = null;
if (type == null || type == 0) { // 全部客户(去重) if (type == null || type == 0) { // 全部客户(去重)
List<CrmClientData> myClient = getMyCilent(empNum, orgCode, groupId, status, like); List<CrmClientData> myClient = getMyCilent(empNum, orgCode, groupId, status, like,startCreateTime,endCreateTime,startFollowTime,endFollowTime);
List<CrmClientData> myAsso = getMyAssociateCilent(empNum, orgCode, groupId, status, like); List<CrmClientData> myAsso = getMyAssociateCilent(empNum, orgCode, groupId, status, like);
crmClientDatas = CheckUtil.distinct(myClient, myAsso, true).stream() crmClientDatas = CheckUtil.distinct(myClient, myAsso, true).stream()
.filter(CheckUtil.distinctByKey(CrmClientData::getId)).collect(Collectors.toList()); .filter(CheckUtil.distinctByKey(CrmClientData::getId)).collect(Collectors.toList());
} else if (type == 1) // 我负责的客户 } else if (type == 1) // 我负责的客户
crmClientDatas = getMyCilent(empNum, orgCode, groupId, status, like); crmClientDatas = getMyCilent(empNum, orgCode, groupId, status, like,startCreateTime,endCreateTime,startFollowTime,endFollowTime);
else if (type == 2) // 我协作的客户 else if (type == 2) // 我协作的客户
crmClientDatas = getMyAssociateCilent(empNum, orgCode, groupId, status, like); crmClientDatas = getMyAssociateCilent(empNum, orgCode, groupId, status, like);
else if (type == 3) // 我关注的客户 else if (type == 3) // 我关注的客户
......
...@@ -10,6 +10,7 @@ package cn.timer.api.controller.crm; ...@@ -10,6 +10,7 @@ package cn.timer.api.controller.crm;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -94,7 +95,7 @@ public class CrmRuleController { ...@@ -94,7 +95,7 @@ public class CrmRuleController {
*/ */
// app提醒 // app提醒
private void remind(String belongUserName, String clienName, Integer four) { private void remind(String belongUserName, String clienName, Integer four) {
System.err.println( Logoutput(
belongUserName + "的客户:" + clienName + "还有" + four + "天即将过期," + "正在向'" + belongUserName + "'的App发推送提醒"); belongUserName + "的客户:" + clienName + "还有" + four + "天即将过期," + "正在向'" + belongUserName + "'的App发推送提醒");
// TODO // TODO
} }
...@@ -108,5 +109,19 @@ public class CrmRuleController { ...@@ -108,5 +109,19 @@ public class CrmRuleController {
new QueryWrapper<CrmClientAssociate>().lambda().eq(CrmClientAssociate::getCid, crmClientData.getId())); new QueryWrapper<CrmClientAssociate>().lambda().eq(CrmClientAssociate::getCid, crmClientData.getId()));
crmClientData.updateById(); crmClientData.updateById();
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -216,7 +216,7 @@ public class FileHelper { ...@@ -216,7 +216,7 @@ public class FileHelper {
inputStream.close(); inputStream.close();
} }
System.out.println("info:" + url + " download success"); // System.out.println("info:" + url + " download success");
return filePath; return filePath;
} }
......
...@@ -5,6 +5,7 @@ import java.util.Date; ...@@ -5,6 +5,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -85,7 +86,7 @@ public class HtzzController { ...@@ -85,7 +86,7 @@ public class HtzzController {
return ResultUtil.error("请充值后使用短信功能!"); return ResultUtil.error("请充值后使用短信功能!");
} }
if (date != null && date.getTime() <= new Date().getTime()) { if (date != null && date.getTime() <= new Date().getTime()) {
System.err.println("企业 " + orgCode + " :短信套餐已过期"); Logoutput("企业 " + orgCode + " :短信套餐已过期");
return ResultUtil.error("短信套餐已到期!"); return ResultUtil.error("短信套餐已到期!");
} }
...@@ -247,7 +248,7 @@ public class HtzzController { ...@@ -247,7 +248,7 @@ public class HtzzController {
CronUtil.schedule("*/2 * * 24 * *", new Task() { CronUtil.schedule("*/2 * * 24 * *", new Task() {
@Override @Override
public void execute() { public void execute() {
System.out.println("start:" + new Date()); Logoutput("start:" + new Date());
} }
}); });
...@@ -256,4 +257,17 @@ public class HtzzController { ...@@ -256,4 +257,17 @@ public class HtzzController {
return ResultUtil.success("操作成功"); return ResultUtil.success("操作成功");
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -6,6 +6,7 @@ import java.util.stream.Collectors; ...@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -423,7 +424,7 @@ public class JxglController { ...@@ -423,7 +424,7 @@ public class JxglController {
JxglAppraisalItem appraisalItem = JxglAppraisalItem.builder().build(); JxglAppraisalItem appraisalItem = JxglAppraisalItem.builder().build();
JxglAppraisalLog appraisalLog = JxglAppraisalLog.builder().build(); JxglAppraisalLog appraisalLog = JxglAppraisalLog.builder().build();
System.out.println("listEmpId----" + listEmpId); Logoutput("listEmpId----" + listEmpId);
for (Integer bAP : listEmpId) { for (Integer bAP : listEmpId) {
// 考核 // 考核
appraisal.setPerformanceAppraisalId(pA.getId()); appraisal.setPerformanceAppraisalId(pA.getId());
...@@ -434,7 +435,7 @@ public class JxglController { ...@@ -434,7 +435,7 @@ public class JxglController {
appraisal.setSts(AppraisalSts.TARGET_FILL_IN.getType()); appraisal.setSts(AppraisalSts.TARGET_FILL_IN.getType());
// 新增 考核 // 新增 考核
appraisal.insert(); appraisal.insert();
System.out.println("新增 考核:" + appraisal); Logoutput("新增 考核:" + appraisal);
List<Integer> pNWeights = listPN.stream().filter(p -> p.getProcessType() == 2 || p.getProcessType() == 3 ).map(ProcessNode::getWeight).collect(Collectors.toList()); List<Integer> pNWeights = listPN.stream().filter(p -> p.getProcessType() == 2 || p.getProcessType() == 3 ).map(ProcessNode::getWeight).collect(Collectors.toList());
Integer sum = 0; Integer sum = 0;
...@@ -493,7 +494,7 @@ public class JxglController { ...@@ -493,7 +494,7 @@ public class JxglController {
} }
// 新增 流程节点 // 新增 流程节点
processNode.insert(); processNode.insert();
System.out.println("新增 流程节点:" + processNode); Logoutput("新增 流程节点:" + processNode);
}); });
...@@ -515,7 +516,7 @@ public class JxglController { ...@@ -515,7 +516,7 @@ public class JxglController {
appraisalIndicators.setAppraisalId(appraisal.getId()); appraisalIndicators.setAppraisalId(appraisal.getId());
// 新增 考核指标 // 新增 考核指标
appraisalIndicators.insert(); appraisalIndicators.insert();
// System.out.println("新增 考核指标:" + appraisalIndicators); // Logoutput("新增 考核指标:" + appraisalIndicators);
List<JxglAppraisalItemT> listAItemT = jsxglAppraisalItemTMapper List<JxglAppraisalItemT> listAItemT = jsxglAppraisalItemTMapper
.selectList(new QueryWrapper<JxglAppraisalItemT>().lambda() .selectList(new QueryWrapper<JxglAppraisalItemT>().lambda()
...@@ -528,7 +529,7 @@ public class JxglController { ...@@ -528,7 +529,7 @@ public class JxglController {
// 新增 考核项 // 新增 考核项
appraisalItem.insert(); appraisalItem.insert();
// System.out.println("新增 考核项:" + appraisalItem); // Logoutput("新增 考核项:" + appraisalItem);
}); });
} }
...@@ -1876,11 +1877,11 @@ public class JxglController { ...@@ -1876,11 +1877,11 @@ public class JxglController {
Integer max = 0; Integer max = 0;
total = aWeights*0.01*selfAssessment + bWeights*0.01*superiorAssessment; total = aWeights*0.01*selfAssessment + bWeights*0.01*superiorAssessment;
System.out.println(total); Logoutput(String.valueOf(total));
System.out.println(aWeights); Logoutput(String.valueOf(aWeights));
System.out.println(selfAssessment); Logoutput(String.valueOf(selfAssessment));
System.out.println(bWeights); Logoutput(String.valueOf(bWeights));
System.out.println(superiorAssessment); Logoutput(String.valueOf(superiorAssessment));
List<JxglPerformanceRating> listPR = bS.getPerformanceRatings(); List<JxglPerformanceRating> listPR = bS.getPerformanceRatings();
for (JxglPerformanceRating pR : listPR) { for (JxglPerformanceRating pR : listPR) {
...@@ -1889,9 +1890,9 @@ public class JxglController { ...@@ -1889,9 +1890,9 @@ public class JxglController {
level = pR.getSectionMinScore() < total && total <= pR.getSectionMaxScore() ? pR.getName() : null; level = pR.getSectionMinScore() < total && total <= pR.getSectionMaxScore() ? pR.getName() : null;
} }
System.out.println(min); Logoutput(String.valueOf(min));
System.out.println(max); Logoutput(String.valueOf(max));
System.out.println(level); Logoutput(level);
if (level == null) { if (level == null) {
for (JxglPerformanceRating pR : listPR) { for (JxglPerformanceRating pR : listPR) {
if (total < min && pR.getSectionMinScore().equals(min)) { if (total < min && pR.getSectionMinScore().equals(min)) {
...@@ -1904,7 +1905,7 @@ public class JxglController { ...@@ -1904,7 +1905,7 @@ public class JxglController {
} }
} }
} }
System.out.println(level); Logoutput(level);
// 更新 考核-总分 等级 // 更新 考核-总分 等级
jxglAppraisalMapper.updateById(JxglAppraisal.builder().id(appraisal.getId()) jxglAppraisalMapper.updateById(JxglAppraisal.builder().id(appraisal.getId())
...@@ -2071,7 +2072,7 @@ public class JxglController { ...@@ -2071,7 +2072,7 @@ public class JxglController {
.select(ZzglBmgwM::getId) .select(ZzglBmgwM::getId)
.eq(ZzglBmgwM::getOrgCode, userBean.getOrgCode()) .eq(ZzglBmgwM::getOrgCode, userBean.getOrgCode())
.eq(ZzglBmgwM::getLeader, empNum)); .eq(ZzglBmgwM::getLeader, empNum));
System.out.println("listBM-----"+ listBM); Logoutput("listBM-----"+ listBM);
ZzglBmgwM ZzglBmgwM = CollUtil.getFirst(listBM); ZzglBmgwM ZzglBmgwM = CollUtil.getFirst(listBM);
if (ZzglBmgwM == null) { if (ZzglBmgwM == null) {
return ResultUtil.success(); return ResultUtil.success();
...@@ -2109,4 +2110,18 @@ public class JxglController { ...@@ -2109,4 +2110,18 @@ public class JxglController {
return ResultUtil.data(pageA, listA); return ResultUtil.data(pageA, listA);
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -1427,7 +1427,7 @@ public class AttController { ...@@ -1427,7 +1427,7 @@ public class AttController {
if(attass.getAtttype() == 2){//排班制 考勤组与用户、用户排班 if(attass.getAtttype() == 2){//排班制 考勤组与用户、用户排班
scheduleservice.deleteByPrimaryByUserid(Integer.valueOf(attser[u])); scheduleservice.deleteByPrimaryByUserid(Integer.valueOf(attser[u]));
} }
userattendancerelservice.deleteByPrimaryByUserid(Integer.valueOf(attser[u])); userattendancerelservice.deleteByPrimaryByUserid(Integer.valueOf(attser[u]),qyid);
UserAttendanceRel kquser = new UserAttendanceRel(); UserAttendanceRel kquser = new UserAttendanceRel();
kquser.setKqzid(attgrpid); kquser.setKqzid(attgrpid);
......
...@@ -1497,94 +1497,92 @@ public class ClockInController { ...@@ -1497,94 +1497,92 @@ public class ClockInController {
boolean sbdkkd = false;//针对于上班 未超过上班卡打卡 视为无效打卡 boolean sbdkkd = false;//针对于上班 未超过上班卡打卡 视为无效打卡
long punchcardtime = 0,punchstart = 0,punchend = 0;//应打卡时间,应打卡开始时间,应打卡结束时间 long punchcardtime = 0,punchstart = 0,punchend = 0;//应打卡时间,应打卡开始时间,应打卡结束时间
boolean chenexday = false;
ClockCollectData clockt = new ClockCollectData(); ClockCollectData clockt = new ClockCollectData();
// putime: 根据日期 得到打卡所需的详细信息 // putime: 根据日期 得到打卡所需的详细信息
AttendanceCardListDto attdate = MethodCall(qyid,userid,putime); AttendanceCardListDto attdate = MethodCall(qyid,userid,putime);
if(attgro != null) {//判断考勤组是否存在 if(attgro != null) {//判断考勤组是否存在
if(attdate.getAttgrouptype() != 3) { if(attdate.getAttgrouptype() != 3) {
//查询打卡当天是否有记录**********************************
List<AttSchedule> checknextday = attdate.getAttsch();
if(checknextday.size() > 0) {
for(int c=0;c<checknextday.size();c++) {
if(checknextday.get(c).getNextday() == 2) {
chenexday = true;
}
}
}
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build(); KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1"));
boolean dnck = false; boolean dnck = false;
boolean crdk = false;//当次打卡是否存在次日打卡 boolean crdk = false;//当次打卡是否存在次日打卡
if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息 if(chenexday) {
KqglAssoBcsz shif = kqglassobcszmapper.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, balan.getBcid())); //查询打卡当天是否有记录**********************************
int dkcs = shif.getSxbcs()*2; // KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间 String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday);
if(ashss.size() > 0) { //检查昨日的班次是否存在次日打卡
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashss.get(0).getTime())));//当天应打的首次上班卡时间 KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1"));
Date sd2=df1.parse(current_time);//当前时间 // boolean dnck = false;
if(sd1.after(sd2)) {//大于 // boolean crdk = false;//当次打卡是否存在次日打卡
dnck = true; if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息
KqglAssoBcsz shif = kqglassobcszmapper.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, balan.getBcid()));
int dkcs = shif.getSxbcs()*2;
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
if(ashss.size() > 0) {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashss.get(0).getTime())));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间
if(sd1.after(sd2)) {//大于
dnck = true;
}
} }
} int isXbdk1Cr = shif.getIsXbdk1Cr();//下班1是否次日(0:否;1:是)
int isXbdk1Cr = shif.getIsXbdk1Cr();//下班1是否次日(0:否;1:是) int isSbdk2Cr = shif.getIsSbdk2Cr();//上班2是否次日(0:否;1:是)
int isSbdk2Cr = shif.getIsSbdk2Cr();//上班2是否次日(0:否;1:是) int isXbdk2Cr = shif.getIsXbdk2Cr();//下班2是否次日(0:否;1:是)
int isXbdk2Cr = shif.getIsXbdk2Cr();//下班2是否次日(0:否;1:是) int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是)
int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是) int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是)
int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是) if(balan.getSort() <= dkcs) {
if(balan.getSort() <= dkcs) { if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) {
crdk = true;
if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) { }
crdk = true;
} }
}else {
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
// if(balan.getSort()+1 == 2 && dkcs == 2) { //无记录的话就找昨天的数据
// //次日 AttendanceCardListDto attdate1 = MethodCall(qyid,userid,yesterday);
// if(isXbdk1Cr > 0) { crdk = true; } List<AttSchedule> ashssyebo = attdate1.getAttsch();//获取昨天应打卡时间
// } if(ashssyebo.size() > 0) {
// if(balan.getSort()+1 == 3 && dkcs == 4) { Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashssyebo.get(0).getTime())));//当天应打的首次上班卡时间
// if(isSbdk2Cr > 0) {crdk = true; } Date sd2=df1.parse(current_time);//当前时间
// } if(sd2.after(sd1)) {//大于
// if(balan.getSort()+1 == 4 && dkcs == 4) { dnck = true;
// if(isXbdk2Cr > 0) { crdk = true; } }
// }
// if(balan.getSort()+1 == 5 && dkcs == 6) {
// if(isSbdk3Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 6 && dkcs == 6) {
// if(isXbdk3Cr > 0) { crdk = true; }
// }
}
}else {
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
//无记录的话就找昨天的数据
AttendanceCardListDto attdate1 = MethodCall(qyid,userid,yesterday);
List<AttSchedule> ashssyebo = attdate1.getAttsch();//获取昨天应打卡时间
if(ashssyebo.size() > 0) {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashssyebo.get(0).getTime())));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间
if(sd2.after(sd1)) {//大于
dnck = true;
} }
}
if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && ashss.get(0).getId() != 0) {//班次不为空
KqglAssoBcsz shifi = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, ashss.get(0).getId()));
int isXbdk1Cr = shifi.getIsXbdk1Cr();//下班1是否次日(0:否;1:是)
int isSbdk2Cr = shifi.getIsSbdk2Cr();//上班2是否次日(0:否;1:是)
int isXbdk2Cr = shifi.getIsXbdk2Cr();//下班2是否次日(0:否;1:是)
int isSbdk3Cr = shifi.getIsSbdk3Cr();//上班3是否次日(0:否;1:是)
int isXbdk3Cr = shifi.getIsXbdk3Cr();//下班3是否次日(0:否;1:是)
if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) { if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && ashss.get(0).getId() != 0) {//班次不为空
crdk = true; KqglAssoBcsz shifi = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, ashss.get(0).getId()));
int isXbdk1Cr = shifi.getIsXbdk1Cr();//下班1是否次日(0:否;1:是)
int isSbdk2Cr = shifi.getIsSbdk2Cr();//上班2是否次日(0:否;1:是)
int isXbdk2Cr = shifi.getIsXbdk2Cr();//下班2是否次日(0:否;1:是)
int isSbdk3Cr = shifi.getIsSbdk3Cr();//上班3是否次日(0:否;1:是)
int isXbdk3Cr = shifi.getIsXbdk3Cr();//下班3是否次日(0:否;1:是)
attdate = MethodCall(qyid,userid,yesterday); if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) {
crdk = true;
}else {
crdk = false; attdate = MethodCall(qyid,userid,yesterday);
}else {
crdk = false;
}
} }
} }
} }
if(crdk && dnck) { if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday));
......
...@@ -607,13 +607,12 @@ public class TimeCardController { ...@@ -607,13 +607,12 @@ public class TimeCardController {
try { try {
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
com.alibaba.fastjson.JSONObject object = JSON.parseObject(request.getBody()); com.alibaba.fastjson.JSONObject object = JSON.parseObject(request.getBody());
System.err.println(object.get("message"));
msg = object.get("message").toString(); msg = object.get("message").toString();
sta.setCode(state[p]); sta.setCode(state[p]);
sta.setState(Integer.valueOf(object.get("data").toString())); sta.setState(Integer.valueOf(object.get("data").toString()));
stas.add(sta); stas.add(sta);
} catch (RestClientException e) { } catch (RestClientException e) {
System.err.println("提示:考勤机服务出错-1"); Logoutput("提示:考勤机服务出错-1");
return ResultUtil.success("失败"); return ResultUtil.success("失败");
} }
} }
...@@ -636,9 +635,9 @@ public class TimeCardController { ...@@ -636,9 +635,9 @@ public class TimeCardController {
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
try { try {
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
} catch (RestClientException e) { } catch (RestClientException e) {
System.err.println("提示:考勤机服务出错-2"); Logoutput("提示:考勤机服务出错-2");
return ResultUtil.success("失败"); return ResultUtil.success("失败");
} }
return ResultUtil.success("成功"); return ResultUtil.success("成功");
...@@ -666,9 +665,9 @@ public class TimeCardController { ...@@ -666,9 +665,9 @@ public class TimeCardController {
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
try { try {
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
} catch (RestClientException e) { } catch (RestClientException e) {
System.err.println("提示:考勤机服务出错-3"); Logoutput("提示:考勤机服务出错-3");
return ResultUtil.success("失败"); return ResultUtil.success("失败");
} }
KqglAssoYhsb.builder().id(id).isGly(0).build().updateById(); KqglAssoYhsb.builder().id(id).isGly(0).build().updateById();
...@@ -698,9 +697,9 @@ public class TimeCardController { ...@@ -698,9 +697,9 @@ public class TimeCardController {
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
try { try {
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
} catch (RestClientException e) { } catch (RestClientException e) {
System.err.println("提示:考勤机服务出错-4"); Logoutput("提示:考勤机服务出错-4");
return ResultUtil.success("失败"); return ResultUtil.success("失败");
} }
...@@ -743,10 +742,9 @@ public class TimeCardController { ...@@ -743,10 +742,9 @@ public class TimeCardController {
try { try {
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
com.alibaba.fastjson.JSONObject object = JSON.parseObject(request.getBody()); com.alibaba.fastjson.JSONObject object = JSON.parseObject(request.getBody());
System.err.println(object.get("message"));
msg = object.get("message").toString(); msg = object.get("message").toString();
} catch (RestClientException e) { } catch (RestClientException e) {
// System.err.println("提示:考勤机服务出错"); // Logoutputln("提示:考勤机服务出错");
return ResultUtil.success(msg); return ResultUtil.success(msg);
} }
...@@ -1241,9 +1239,9 @@ public class TimeCardController { ...@@ -1241,9 +1239,9 @@ public class TimeCardController {
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
try { try {
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
} catch (RestClientException e) { } catch (RestClientException e) {
System.err.println("提示:考勤机服务出错-5"); Logoutput("提示:考勤机服务出错-5");
return ResultUtil.error("删除失败:提示:考勤机服务出错"); return ResultUtil.error("删除失败:提示:考勤机服务出错");
} }
...@@ -1382,7 +1380,7 @@ public class TimeCardController { ...@@ -1382,7 +1380,7 @@ public class TimeCardController {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, attser[u]).eq(KqglAssoYhsb::getKqjid, kqj.getId())); KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, attser[u]).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
...@@ -1555,7 +1553,7 @@ public class TimeCardController { ...@@ -1555,7 +1553,7 @@ public class TimeCardController {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(urladd, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(urladd, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
//需要改下下 //需要改下下
KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(Integer.valueOf(addmember[a])).kqjid(kqjid).type(1).isGly(0).build(); KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(Integer.valueOf(addmember[a])).kqjid(kqjid).type(1).isGly(0).build();
...@@ -1581,7 +1579,7 @@ public class TimeCardController { ...@@ -1581,7 +1579,7 @@ public class TimeCardController {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(urlre, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(urlre, httpEntity, String.class);
System.err.print(request.getBody()); Logoutput(request.getBody());
//用户与设备关系表 //用户与设备关系表
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, removemember[r]).eq(KqglAssoYhsb::getKqjid, kqjid).eq(KqglAssoYhsb::getType, 1)); KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, removemember[r]).eq(KqglAssoYhsb::getKqjid, kqjid).eq(KqglAssoYhsb::getType, 1));
...@@ -3119,7 +3117,19 @@ public class TimeCardController { ...@@ -3119,7 +3117,19 @@ public class TimeCardController {
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
......
...@@ -8,6 +8,7 @@ import java.util.Date; ...@@ -8,6 +8,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -361,7 +362,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -361,7 +362,7 @@ public class KqglServiceImpl implements KqglService {
String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间 String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间
boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm"); boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm");
if (!effectiveDate) { if (!effectiveDate) {
System.out.println("当前打卡时间不在范围内"); Logoutput("当前打卡时间不在范围内");
isRange = false; isRange = false;
} }
} }
...@@ -390,7 +391,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -390,7 +391,7 @@ public class KqglServiceImpl implements KqglService {
String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间 String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间
boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm"); boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm");
if (!effectiveDate) { if (!effectiveDate) {
System.out.println("当前打卡时间不在范围内"); Logoutput("当前打卡时间不在范围内");
isRange = false; isRange = false;
} }
} }
...@@ -533,7 +534,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -533,7 +534,7 @@ public class KqglServiceImpl implements KqglService {
String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间 String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间
boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm"); boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm");
if (!effectiveDate) { if (!effectiveDate) {
System.out.println("当前打卡时间不在范围内"); Logoutput("当前打卡时间不在范围内");
isRange = false; isRange = false;
} }
} }
...@@ -564,7 +565,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -564,7 +565,7 @@ public class KqglServiceImpl implements KqglService {
String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间 String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(repaappr.getCardrepltime());//打卡时间
boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm"); boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm");
if (!effectiveDate) { if (!effectiveDate) {
System.out.println("当前打卡时间不在范围内"); Logoutput("当前打卡时间不在范围内");
isRange = false; isRange = false;
} }
} }
...@@ -824,7 +825,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -824,7 +825,7 @@ public class KqglServiceImpl implements KqglService {
String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_);//打卡时间 String DKputime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_);//打卡时间
boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm"); boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime,"yyyy-MM-dd HH:mm");
if (!effectiveDate) { if (!effectiveDate) {
System.out.println("当前打卡时间不在范围内"); Logoutput("当前打卡时间不在范围内");
isRange = false; isRange = false;
} }
...@@ -1091,4 +1092,17 @@ public class KqglServiceImpl implements KqglService { ...@@ -1091,4 +1092,17 @@ public class KqglServiceImpl implements KqglService {
} }
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -6,6 +6,7 @@ import java.util.Date; ...@@ -6,6 +6,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -601,10 +602,10 @@ public class SocialSecurityFundController { ...@@ -601,10 +602,10 @@ public class SocialSecurityFundController {
deta.setAddtime(new Date().getTime()); deta.setAddtime(new Date().getTime());
detalis.add(deta); detalis.add(deta);
System.out.println("公司-社保:"+preval); Logoutput("公司-社保:"+preval);
gssocial += preval; gssocial += preval;
} }
System.out.println("公司社保总:"+formatDouble1(gssocial)); Logoutput("公司社保总:"+formatDouble1(gssocial));
if(detalis.size()>0){ if(detalis.size()>0){
sbgjjassodetailedmapper.insertsbgjjassodetailedList(detalis); sbgjjassodetailedmapper.insertsbgjjassodetailedList(detalis);
...@@ -638,11 +639,11 @@ public class SocialSecurityFundController { ...@@ -638,11 +639,11 @@ public class SocialSecurityFundController {
} }
System.out.println("个人-社保:"+preval); Logoutput("个人-社保:"+preval);
grsocial += preval; grsocial += preval;
} }
System.out.println("个人社保总:"+formatDouble1(grsocial)); Logoutput("个人社保总:"+formatDouble1(grsocial));
if(!(insuredto.getJnmouth()).equals(insuredto.getGjjJnmouth())) { if(!(insuredto.getJnmouth()).equals(insuredto.getGjjJnmouth())) {
// sbgjjassoyjzdmapper.deletesbgjjassoyjzd(insuredto.getUsernum(),orgCode,insuredto.getJnmouth()); // sbgjjassoyjzdmapper.deletesbgjjassoyjzd(insuredto.getUsernum(),orgCode,insuredto.getJnmouth());
...@@ -711,10 +712,10 @@ public class SocialSecurityFundController { ...@@ -711,10 +712,10 @@ public class SocialSecurityFundController {
deta.setAddtime(new Date().getTime()); deta.setAddtime(new Date().getTime());
deta.insert(); deta.insert();
System.out.println("公司-公积金:"+preval); Logoutput("公司-公积金:"+preval);
gsfund += preval; gsfund += preval;
} }
System.out.println("公司公积金总:"+formatDouble1(gsfund)); Logoutput("公司公积金总:"+formatDouble1(gsfund));
//个人 //个人
...@@ -742,10 +743,10 @@ public class SocialSecurityFundController { ...@@ -742,10 +743,10 @@ public class SocialSecurityFundController {
SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).build().updateById(); SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).build().updateById();
} }
System.out.println("个人-公积金:"+preval); Logoutput("个人-公积金:"+preval);
grgsfund += preval; grgsfund += preval;
} }
System.out.println("个人公积金总:"+formatDouble1(grgsfund)); Logoutput("个人公积金总:"+formatDouble1(grgsfund));
if(!(insuredto.getJnmouth()).equals(insuredto.getGjjJnmouth())) { if(!(insuredto.getJnmouth()).equals(insuredto.getGjjJnmouth())) {
// sbgjjassoyjzdmapper.deletesbgjjassoyjzd(insuredto.getUsernum(),orgCode,insuredto.getGjjJnmouth()); // sbgjjassoyjzdmapper.deletesbgjjassoyjzd(insuredto.getUsernum(),orgCode,insuredto.getGjjJnmouth());
...@@ -936,10 +937,9 @@ public class SocialSecurityFundController { ...@@ -936,10 +937,9 @@ public class SocialSecurityFundController {
double gsh = gsbili.divide(bfb).doubleValue(); double gsh = gsbili.divide(bfb).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxx)*gsh); preval = formatDouble1(Double.valueOf(jishuxx)*gsh);
} }
System.out.println(preval);
gssocial += preval; gssocial += preval;
} }
System.out.println("公司社保总:"+formatDouble1(gssocial)); Logoutput("公司社保总:"+formatDouble1(gssocial));
//个人 //个人
...@@ -959,11 +959,10 @@ public class SocialSecurityFundController { ...@@ -959,11 +959,10 @@ public class SocialSecurityFundController {
double gsh = gsbigr.divide(bfgr).doubleValue(); double gsh = gsbigr.divide(bfgr).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh); preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh);
} }
System.out.println(preval);
grsocial += preval; grsocial += preval;
} }
System.out.println("个人社保总:"+formatDouble1(grsocial)); Logoutput("个人社保总:"+formatDouble1(grsocial));
String gjjgshj_ = "0.0"; String gjjgshj_ = "0.0";
String gjjgrhj_ = "0.0"; String gjjgrhj_ = "0.0";
...@@ -1022,10 +1021,9 @@ public class SocialSecurityFundController { ...@@ -1022,10 +1021,9 @@ public class SocialSecurityFundController {
double gsh = gsbili.divide(bfb).doubleValue(); double gsh = gsbili.divide(bfb).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxx)*gsh); preval = formatDouble1(Double.valueOf(jishuxx)*gsh);
} }
System.out.println(preval);
gsfund += preval; gsfund += preval;
} }
System.out.println("公司公积金总:"+formatDouble1(gsfund)); Logoutput("公司公积金总:"+formatDouble1(gsfund));
//个人 //个人
...@@ -1045,10 +1043,9 @@ public class SocialSecurityFundController { ...@@ -1045,10 +1043,9 @@ public class SocialSecurityFundController {
double gsh = gsbigr.divide(bfgr).doubleValue(); double gsh = gsbigr.divide(bfgr).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh); preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh);
} }
System.out.println(preval);
grgsfund += preval; grgsfund += preval;
} }
System.out.println("个人公积金总:"+formatDouble1(grgsfund)); Logoutput("个人公积金总:"+formatDouble1(grgsfund));
String sbgshj_="0.0"; String sbgshj_="0.0";
String sbgrhj_="0.0"; String sbgrhj_="0.0";
String sbhj_="0.0"; String sbhj_="0.0";
...@@ -1172,4 +1169,18 @@ public class SocialSecurityFundController { ...@@ -1172,4 +1169,18 @@ public class SocialSecurityFundController {
return new ResponseResult().success("成功", yjzlist); return new ResponseResult().success("成功", yjzlist);
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -10,6 +10,7 @@ import java.util.Set; ...@@ -10,6 +10,7 @@ import java.util.Set;
import cn.timer.api.dto.spmk.*; import cn.timer.api.dto.spmk.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
...@@ -314,7 +315,6 @@ public class SpmkController { ...@@ -314,7 +315,6 @@ public class SpmkController {
public Result<Object> selectListAgByAdmin(@CurrentUser UserBean userBean){ public Result<Object> selectListAgByAdmin(@CurrentUser UserBean userBean){
List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum()); List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
System.out.println(depts);
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCaByAdmin(userBean.getOrgCode(), userBean.getEmpNum(), depts)); return ResultUtil.data(spmkApprovalGMapper.selectListAgInCaByAdmin(userBean.getOrgCode(), userBean.getEmpNum(), depts));
} }
...@@ -480,12 +480,8 @@ public class SpmkController { ...@@ -480,12 +480,8 @@ public class SpmkController {
.eq(YgglMainEmp::getOrgCode, 311).eq(YgglMainEmp::getEmpNum, 12512)); .eq(YgglMainEmp::getOrgCode, 311).eq(YgglMainEmp::getEmpNum, 12512));
Integer getId = one != null ? one.getBmgwId() : null; Integer getId = one != null ? one.getBmgwId() : null;
System.out.println(getId);
Set<Integer> all = getId != null ? empNumupdept2(lanzi, bmgws, getId) : new HashSet<Integer>(); Set<Integer> all = getId != null ? empNumupdept2(lanzi, bmgws, getId) : new HashSet<Integer>();
all.add(getId); all.add(getId);
System.out.println(all);
return spmkCustomApprovalMapper.updateListRandsById(list) ? ResultUtil.success() : ResultUtil.error(); return spmkCustomApprovalMapper.updateListRandsById(list) ? ResultUtil.success() : ResultUtil.error();
} }
...@@ -529,26 +525,30 @@ public class SpmkController { ...@@ -529,26 +525,30 @@ public class SpmkController {
Router router = spmkApproveSummaryDto.getRouter(); Router router = spmkApproveSummaryDto.getRouter();
List<Router> routers = router.getChildren(); List<Router> routers = router.getChildren();
// routers = RouterUtils.clearRouters(routers);
if(routers==null){
return ResultUtil.error("无法发起,请完善审批流程");
}
if (CollectionUtil.isNotEmpty(routers)) { if (CollectionUtil.isNotEmpty(routers)) {
boolean hasAudit=false; // boolean hasAudit=false;
if(routers.size()>0){ // if(routers.size()>0){
for (Relation relation:routers.get(0).getRelation()) { // for (Relation relation:routers.get(0).getRelation()) {
if(relation.getUsers().size()>0){ // if(relation.getUsers().size()>0){
hasAudit=true; // hasAudit=true;
} // }
} // }
}
// List<Relation> relations = routers.get(0).getRelation();
// if (relations == null || relations.size() < 1) {
// return ResultUtil.error("无法发起,请完善审批流程");
// } // }
// List<User> users = relations.get(0).getUsers(); //// List<Relation> relations = routers.get(0).getRelation();
// if (CollectionUtil.isEmpty(users)) { //// if (relations == null || relations.size() < 1) {
// return ResultUtil.error("无法发起,请完善审批流程"); //// return ResultUtil.error("无法发起,请完善审批流程");
//// }
//// List<User> users = relations.get(0).getUsers();
//// if (CollectionUtil.isEmpty(users)) {
//// return ResultUtil.error("无法发起,请完善审批流程");
//// }
// if(!hasAudit){
// return ResultUtil.error("请选择审批人!");
// } // }
if(!hasAudit){
return ResultUtil.error("请选择审批人!");
}
}else { }else {
return ResultUtil.error("无法发起,请完善审批流程"); return ResultUtil.error("无法发起,请完善审批流程");
} }
...@@ -562,11 +562,28 @@ public class SpmkController { ...@@ -562,11 +562,28 @@ public class SpmkController {
.set("headUrl", ygglMainEmp.getHeadUrl()) .set("headUrl", ygglMainEmp.getHeadUrl())
.set("id", userBean.getEmpNum()); .set("id", userBean.getEmpNum());
RouterUtils.NextNode(listRouter, jSONObject, ISFIRST); RouterUtils.NextNode(listRouter, jSONObject, ISFIRST);
System.out.println(listRouter);
List<FlowChildren> listFlowChildren = new ArrayList<FlowChildren>(); List<FlowChildren> listFlowChildren = new ArrayList<FlowChildren>();
RouterUtils.getIsFlowChildren(listRouter,listFlowChildren); RouterUtils.getIsFlowChildren(listRouter,listFlowChildren);
System.out.println("listFlowChildren");
System.out.println(listFlowChildren); if(listFlowChildren.isEmpty()){
return ResultUtil.error("无法发起,请完善审批流程");
}
for (FlowChildren flowChildrenItem: listFlowChildren) {
if("audit".equals(flowChildrenItem.getClassName())){
boolean hasAudit=false;
for (Relation relation:flowChildrenItem.getRelation()) {
if(relation.getUsers().size()>0){
hasAudit=true;
}
}
if(!hasAudit){
return ResultUtil.error("审批流程设置审批人为空无法发起!");
}
}
}
Logoutput("listFlowChildren");
// 当前审批人 // 当前审批人
String currentApprover = jSONObject.getStr("current_approver"); String currentApprover = jSONObject.getStr("current_approver");
...@@ -726,7 +743,6 @@ public class SpmkController { ...@@ -726,7 +743,6 @@ public class SpmkController {
approvingDto.getUser() approvingDto.getUser()
); );
System.out.println(listFlowChildren);
// 更新 flowChildren // 更新 flowChildren
SpmkApproveDetail.builder().id(ad.getId()).flowChildren(ObjectUtil.serialize(listFlowChildren)).build().updateById(); SpmkApproveDetail.builder().id(ad.getId()).flowChildren(ObjectUtil.serialize(listFlowChildren)).build().updateById();
FlowChildren fc = CollUtil.getLast(listFlowChildren); FlowChildren fc = CollUtil.getLast(listFlowChildren);
...@@ -746,8 +762,8 @@ public class SpmkController { ...@@ -746,8 +762,8 @@ public class SpmkController {
//审批完成后 业务 //审批完成后 业务
SpmkAssoBusiness sab = spmkAssoBusinessFactory.createSpmkService(ApproveEnum.getEnums(aSummary.getAssoType())); SpmkAssoBusiness sab = spmkAssoBusinessFactory.createSpmkService(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null) if (sab != null)
System.out.println("1----------"+ sab); Logoutput("1----------"+ sab);
System.out.println("2----------"+ jSONObject); Logoutput("2----------"+ jSONObject);
sab.handleApprove(jSONObject); sab.handleApprove(jSONObject);
} }
} }
...@@ -789,8 +805,8 @@ public class SpmkController { ...@@ -789,8 +805,8 @@ public class SpmkController {
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, sp.getId())); SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, sp.getId()));
JSONObject as = ObjectUtil.deserialize(ad.getRequestData()); JSONObject as = ObjectUtil.deserialize(ad.getRequestData());
// System.out.println(as); // Logoutput(as);
// System.out.println(sp.getId()+"==========================================="+sp.getAssoType()); // Logoutput(sp.getId()+"==========================================="+sp.getAssoType());
requerstr = ""; requerstr = "";
//assoType : 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡 //assoType : 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
switch (sp.getAssoType()) { switch (sp.getAssoType()) {
...@@ -822,7 +838,7 @@ public class SpmkController { ...@@ -822,7 +838,7 @@ public class SpmkController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
// System.out.println(requerstr); // Logoutput(requerstr);
sp.setDigest(requerstr); sp.setDigest(requerstr);
} }
...@@ -889,7 +905,7 @@ public class SpmkController { ...@@ -889,7 +905,7 @@ public class SpmkController {
spmkApproveDetailMapper.delete(null); spmkApproveDetailMapper.delete(null);
spmkApproveExecuteRecordMapper.delete(null); spmkApproveExecuteRecordMapper.delete(null);
spmkExecutorMapper.delete(null); spmkExecutorMapper.delete(null);
System.out.println("删除-审批组、自定义审批、审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据 完成!"); Logoutput("删除-审批组、自定义审批、审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据 完成!");
return ResultUtil.success(); return ResultUtil.success();
} }
...@@ -969,4 +985,18 @@ public class SpmkController { ...@@ -969,4 +985,18 @@ public class SpmkController {
return ResultUtil.data(qna); return ResultUtil.data(qna);
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -1783,7 +1783,7 @@ public class YgglController { ...@@ -1783,7 +1783,7 @@ public class YgglController {
loginInfo.setEntryTime(ygglMainEmp.getRzTime()); loginInfo.setEntryTime(ygglMainEmp.getRzTime());
if(ygglMainEmp.getSyq()!=null) { if(ygglMainEmp.getSyq()!=null) {
System.out.println(ygglMainEmp.getSyq()); // System.out.println(ygglMainEmp.getSyq());
Date expireDate = DateUtil.offsetMonth(ygglMainEmp.getRzTime(), ygglMainEmp.getSyq()); // 时间偏移 Date expireDate = DateUtil.offsetMonth(ygglMainEmp.getRzTime(), ygglMainEmp.getSyq()); // 时间偏移
loginInfo.setRegularTime(expireDate); loginInfo.setRegularTime(expireDate);
}else { }else {
......
...@@ -520,7 +520,7 @@ public class ZcglController { ...@@ -520,7 +520,7 @@ public class ZcglController {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
System.out.println(id); // System.out.println(id);
// 根据id查询资产详情 // 根据id查询资产详情
QueryWrapper<ZcglAssoZcda> queryWrapper = new QueryWrapper<ZcglAssoZcda>(); QueryWrapper<ZcglAssoZcda> queryWrapper = new QueryWrapper<ZcglAssoZcda>();
queryWrapper.eq("org_code", orgCode).eq("id", id); queryWrapper.eq("org_code", orgCode).eq("id", id);
...@@ -560,7 +560,7 @@ public class ZcglController { ...@@ -560,7 +560,7 @@ public class ZcglController {
} }
zcly.update(updateWrapper2); zcly.update(updateWrapper2);
System.out.println(id); // System.out.println(id);
// 插入资产归还表 // 插入资产归还表
zcgh.setZcid(id); zcgh.setZcid(id);
......
...@@ -57,7 +57,7 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -57,7 +57,7 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
.select(YgglMainEmp::getBmgwId) .select(YgglMainEmp::getBmgwId)
.eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, empNum).one(); .eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, empNum).one();
Integer getId = one != null ? one.getBmgwId() : null; Integer getId = one != null ? one.getBmgwId() : null;
System.out.println(getId); // System.out.println(getId);
Set<Integer> all = one != null ? empNumupdept2(lanzi, bmgws, getId) : new HashSet<Integer>(); Set<Integer> all = one != null ? empNumupdept2(lanzi, bmgws, getId) : new HashSet<Integer>();
all.add(getId); all.add(getId);
return ListUtil.toList(all); return ListUtil.toList(all);
......
...@@ -20,7 +20,7 @@ public interface HtzzAssoZztxMapper extends BaseMapper<HtzzAssoZztx> { ...@@ -20,7 +20,7 @@ public interface HtzzAssoZztxMapper extends BaseMapper<HtzzAssoZztx> {
public static void main(String[] args) { public static void main(String[] args) {
DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
String a = format1.format(new Date()); String a = format1.format(new Date());
System.err.println(a); // System.err.println(a);
} }
} }
...@@ -23,7 +23,7 @@ public interface UserAttendanceRelMapper { ...@@ -23,7 +23,7 @@ public interface UserAttendanceRelMapper {
List<UserAttendanceRel> selectAttendanceOfficerByKqzid(Integer kqzid,int orgcode); List<UserAttendanceRel> selectAttendanceOfficerByKqzid(Integer kqzid,int orgcode);
int deleteByPrimaryByUserid(Integer userid); int deleteByPrimaryByUserid(Integer userid,Integer qyid);
List<UserAttendanceRel> selectAttNotMember(int dkfsid,int qyid); List<UserAttendanceRel> selectAttNotMember(int dkfsid,int qyid);
......
...@@ -239,11 +239,11 @@ public class AliyunSMS { ...@@ -239,11 +239,11 @@ public class AliyunSMS {
String orderNo = quantity.getOrderNo(); String orderNo = quantity.getOrderNo();
if (quantity == null || remainder == null || remainder <= 0) { if (quantity == null || remainder == null || remainder <= 0) {
System.err.println("企业 " + orgCode + " :套餐余额不足,请充钱"); Logoutput("企业 " + orgCode + " :套餐余额不足,请充钱");
return "请先充值购买短信套餐!"; return "请先充值购买短信套餐!";
} }
if (date != null && date.getTime() <= new Date().getTime()) { if (date != null && date.getTime() <= new Date().getTime()) {
System.err.println("企业 " + orgCode + " :短信套餐已过期"); Logoutput("企业 " + orgCode + " :短信套餐已过期");
return "套餐已过期"; return "套餐已过期";
} }
...@@ -295,4 +295,17 @@ public class AliyunSMS { ...@@ -295,4 +295,17 @@ public class AliyunSMS {
return "发送失败"; return "发送失败";
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -89,7 +89,7 @@ public class OSSUtil { ...@@ -89,7 +89,7 @@ public class OSSUtil {
// 关闭OSSClient。 // 关闭OSSClient。
ossClient.shutdown(); ossClient.shutdown();
// 控制台输出空间名 // 控制台输出空间名
System.err.println("bucketName:" + bucketName); Logoutput("bucketName:" + bucketName);
// 返回成功 // 返回成功
return ResultUtil.success("创建OSS空间成功"); return ResultUtil.success("创建OSS空间成功");
} }
...@@ -105,9 +105,9 @@ public class OSSUtil { ...@@ -105,9 +105,9 @@ public class OSSUtil {
// <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。 // <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
// String objectName = "8time-v2/test/123.jpg"; // String objectName = "8time-v2/test/123.jpg";
// 创建OSSClient实例。 // 创建OSSClient实例。
System.err.println(endpoint); Logoutput(endpoint);
System.err.println(accessKeyId); Logoutput(accessKeyId);
System.err.println(accessKeySecret); Logoutput(accessKeySecret);
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
// 创建PutObjectRequest对象。 // 创建PutObjectRequest对象。
...@@ -130,7 +130,7 @@ public class OSSUtil { ...@@ -130,7 +130,7 @@ public class OSSUtil {
Date expiration = DateUtil.offset(now, DateField.YEAR, 100); // 一百年之后过期 Date expiration = DateUtil.offset(now, DateField.YEAR, 100); // 一百年之后过期
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。 // 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL url = ossClient.generatePresignedUrl(bucketName, path, expiration); URL url = ossClient.generatePresignedUrl(bucketName, path, expiration);
System.err.println(url); Logoutput(String.valueOf(url));
// 关闭OSSClient。 // 关闭OSSClient。
ossClient.shutdown(); ossClient.shutdown();
...@@ -169,7 +169,7 @@ public class OSSUtil { ...@@ -169,7 +169,7 @@ public class OSSUtil {
Date expiration = new Date(new Date().getTime() + 1000 * 600); Date expiration = new Date(new Date().getTime() + 1000 * 600);
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。 // 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL url = ossClient.generatePresignedUrl(bucketName_pri, path, expiration); URL url = ossClient.generatePresignedUrl(bucketName_pri, path, expiration);
System.err.println(url); Logoutput(String.valueOf(url));
// 关闭OSSClient。 // 关闭OSSClient。
ossClient.shutdown(); ossClient.shutdown();
...@@ -202,8 +202,8 @@ public class OSSUtil { ...@@ -202,8 +202,8 @@ public class OSSUtil {
// 关闭OSSClient。 // 关闭OSSClient。
ossClient.shutdown(); ossClient.shutdown();
// 完整路径的文件名 // 完整路径的文件名
System.err.println("objectName:" + project_package + orgCode + "/" + moudle + "/" + dir + "/" + fileName); Logoutput("objectName:" + project_package + orgCode + "/" + moudle + "/" + dir + "/" + fileName);
System.err.println("path:" + path + fileName); Logoutput("path:" + path + fileName);
// 返回成功的本地路径 // 返回成功的本地路径
return ResultUtil.success(path + fileName); return ResultUtil.success(path + fileName);
} }
...@@ -278,7 +278,7 @@ public class OSSUtil { ...@@ -278,7 +278,7 @@ public class OSSUtil {
Date expiration = new Date(new Date().getTime() + Long.parseLong(expirationTime)); Date expiration = new Date(new Date().getTime() + Long.parseLong(expirationTime));
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。 // 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
url = ossClient.generatePresignedUrl(bucketName, newFileName, expiration); url = ossClient.generatePresignedUrl(bucketName, newFileName, expiration);
System.err.println(url); Logoutput(String.valueOf(url));
} }
} }
...@@ -317,7 +317,7 @@ public class OSSUtil { ...@@ -317,7 +317,7 @@ public class OSSUtil {
Date expiration = new Date(new Date().getTime() + Long.parseLong(expirationTime)); Date expiration = new Date(new Date().getTime() + Long.parseLong(expirationTime));
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。 // 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL url = ossClient.generatePresignedUrl(bucketName, path, expiration); URL url = ossClient.generatePresignedUrl(bucketName, path, expiration);
System.err.println(url); Logoutput(String.valueOf(url));
// 关闭OSSClient。 // 关闭OSSClient。
ossClient.shutdown(); ossClient.shutdown();
return url.toString(); return url.toString();
...@@ -336,7 +336,7 @@ public class OSSUtil { ...@@ -336,7 +336,7 @@ public class OSSUtil {
Date expiration = new Date(new Date().getTime() + Long.parseLong(expirationTime_pri)); Date expiration = new Date(new Date().getTime() + Long.parseLong(expirationTime_pri));
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。 // 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL url = ossClient.generatePresignedUrl(bucketName, path, expiration); URL url = ossClient.generatePresignedUrl(bucketName, path, expiration);
System.err.println(url); Logoutput(String.valueOf(url));
// 关闭OSSClient。 // 关闭OSSClient。
ossClient.shutdown(); ossClient.shutdown();
return url.toString(); return url.toString();
...@@ -431,7 +431,7 @@ public class OSSUtil { ...@@ -431,7 +431,7 @@ public class OSSUtil {
if (objectListing.getObjectSummaries().size() > 0) { if (objectListing.getObjectSummaries().size() > 0) {
List<String> keys = new ArrayList<String>(); List<String> keys = new ArrayList<String>();
for (OSSObjectSummary s : objectListing.getObjectSummaries()) { for (OSSObjectSummary s : objectListing.getObjectSummaries()) {
System.out.println("key name: " + s.getKey()); Logoutput("key name: " + s.getKey());
keys.add(s.getKey()); keys.add(s.getKey());
} }
DeleteObjectsRequest deleteObjectsRequest = new DeleteObjectsRequest(bucketName).withKeys(keys); DeleteObjectsRequest deleteObjectsRequest = new DeleteObjectsRequest(bucketName).withKeys(keys);
...@@ -560,4 +560,17 @@ public class OSSUtil { ...@@ -560,4 +560,17 @@ public class OSSUtil {
} }
} }
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
} }
...@@ -92,7 +92,7 @@ public class RouterUtils { ...@@ -92,7 +92,7 @@ public class RouterUtils {
if (listRouter.size() == 1) { if (listRouter.size() == 1) {
router = listRouter.get(0); router = listRouter.get(0);
if (router.getExecute() == null) { if (router.getExecute() == null) {
System.out.println("默认UNEXECUTED"); // System.out.println("默认UNEXECUTED");
router.setExecute(UNEXECUTED); router.setExecute(UNEXECUTED);
} }
// 0未执行 1执行中 2已执行 // 0未执行 1执行中 2已执行
...@@ -389,12 +389,26 @@ public class RouterUtils { ...@@ -389,12 +389,26 @@ public class RouterUtils {
if(router.getRelation() != null) { if(router.getRelation() != null) {
for (Relation relation : router.getRelation()) { for (Relation relation : router.getRelation()) {
if (relation != null && CollectionUtil.isNotEmpty(relation.getUsers())) { if (relation != null) {
if (router.getFlow()) { if(CollectionUtil.isNotEmpty(relation.getUsers())){
FlowChildren fc = FlowChildren.builder().build(); if (router.getFlow()) {
BeanUtil.copyProperties(router, fc, "condition","children"); FlowChildren fc = FlowChildren.builder().build();
listFlowChildren.add(fc); BeanUtil.copyProperties(router, fc, "condition","children");
getIsFlowChildren(router.getChildren(), listFlowChildren); listFlowChildren.add(fc);
getIsFlowChildren(router.getChildren(), listFlowChildren);
}
}else{
//无审批人,查询是否跳过或者失败! 0不处理 1指定成员 2自动通过
if("executive".equals(relation.getType()) && relation.getEmpty() == 2){
getIsFlowChildren(router.getChildren(), listFlowChildren);
}else if("executive".equals(relation.getType()) && relation.getEmpty() == 0){
FlowChildren fc = FlowChildren.builder().build();
BeanUtil.copyProperties(router, fc, "condition","children");
listFlowChildren.add(fc);
getIsFlowChildren(router.getChildren(), listFlowChildren);
}else {
//未开发
}
} }
} }
} }
...@@ -579,11 +593,11 @@ public class RouterUtils { ...@@ -579,11 +593,11 @@ public class RouterUtils {
redeployUser.setExecute(UNEXECUTED); redeployUser.setExecute(UNEXECUTED);
users1.add(redeployUser); users1.add(redeployUser);
List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size()); List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
System.out.println(users1); // System.out.println(users1);
System.out.println(users2); // System.out.println(users2);
listUser = ListUtils.union(users1, users2); listUser = ListUtils.union(users1, users2);
n_user = listUser.size(); n_user = listUser.size();
System.out.println(listUser); // System.out.println(listUser);
} }
}else if (UNEXECUTED.equals(listUser.get(i_user).getExecute())) { }else if (UNEXECUTED.equals(listUser.get(i_user).getExecute())) {
SpmkExecutor.builder() SpmkExecutor.builder()
...@@ -714,4 +728,9 @@ public class RouterUtils { ...@@ -714,4 +728,9 @@ public class RouterUtils {
} }
public static List<Router> clearRouters(List<Router> routers){
return routers;
}
} }
...@@ -5,6 +5,7 @@ import java.text.ParseException; ...@@ -5,6 +5,7 @@ import java.text.ParseException;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
...@@ -26,6 +27,19 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -26,6 +27,19 @@ public class EvectionBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private KqglService kqglService; private KqglService kqglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
...@@ -47,7 +61,7 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -47,7 +61,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
// String businessTrip = ObjectUtil.isNull(jsonObj.get("__businessTrip",FromData.class)) ? null : jsonObj.get("__businessTrip",FromData.class).getValue(); // String businessTrip = ObjectUtil.isNull(jsonObj.get("__businessTrip",FromData.class)) ? null : jsonObj.get("__businessTrip",FromData.class).getValue();
// 上传文件 // 上传文件
// String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue(); // String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
System.out.println(approveId); Logoutput(approveId);
AttEvectionApprovalDto eaD = AttEvectionApprovalDto AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder() .builder()
.userid(id) .userid(id)
...@@ -59,7 +73,7 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -59,7 +73,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
System.out.println("出差:" + eaD); Logoutput("出差:" + eaD);
// 调 考勤管理 业务-出差 // 调 考勤管理 业务-出差
kqglService.attevectionapproval(eaD); kqglService.attevectionapproval(eaD);
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
...@@ -22,6 +23,19 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -22,6 +23,19 @@ public class GoOutBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private KqglService kqglService; private KqglService kqglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
...@@ -55,7 +69,7 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -55,7 +69,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
System.out.println("外出:" + eaD); Logoutput("外出:" + eaD);
// 调 考勤管理 业务-外出 // 调 考勤管理 业务-外出
kqglService.attevectionapproval(eaD); kqglService.attevectionapproval(eaD);
} }
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
...@@ -27,6 +28,20 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -27,6 +28,20 @@ public class LeaveBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private KqglService kqglService; private KqglService kqglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -61,7 +76,7 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -61,7 +76,7 @@ public class LeaveBusiness extends SpmkAssoBusiness {
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
System.out.println("请假:" + laD); Logoutput("请假:" + laD);
// 调 考勤管理 业务-请假 // 调 考勤管理 业务-请假
kqglService.attleaveapproval(laD); kqglService.attleaveapproval(laD);
} }
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.util.Date; import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...@@ -29,6 +30,20 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -29,6 +30,20 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private YgglService ygglService; private YgglService ygglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -65,7 +80,7 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -65,7 +80,7 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
.sjzzTime(DateUtil.getFormatDate(newConfirmationTime)) .sjzzTime(DateUtil.getFormatDate(newConfirmationTime))
.zzRemark(Remarks) .zzRemark(Remarks)
.build(); .build();
System.out.println("转正:"+ygzzDto); Logoutput("转正:"+ygzzDto);
// 调 员工管理 业务 // 调 员工管理 业务
// YgglMainEmp.builder() // YgglMainEmp.builder()
// .jobStatus(2) // .jobStatus(2)
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
...@@ -25,6 +26,20 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -25,6 +26,20 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private KqglService kqglService; private KqglService kqglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -55,7 +70,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -55,7 +70,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
.cardreplperiod(Convert.toInt(cardSupplementType)) .cardreplperiod(Convert.toInt(cardSupplementType))
.build(); .build();
System.out.println("补卡:"+raD); Logoutput("补卡:"+raD);
// 调 考勤管理 业务-补卡 // 调 考勤管理 业务-补卡
kqglService.attrepairapproval(raD); kqglService.attrepairapproval(raD);
} }
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
...@@ -26,6 +27,20 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -26,6 +27,20 @@ public class ResignationBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private YgglService ygglService; private YgglService ygglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -50,7 +65,7 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -50,7 +65,7 @@ public class ResignationBusiness extends SpmkAssoBusiness {
.lzyy(ReasonForResignation) .lzyy(ReasonForResignation)
.lzbz(Remarks) .lzbz(Remarks)
.build(); .build();
System.out.println("离职:"+dtO); Logoutput("离职:"+dtO);
// 调 员工管理 业务 // 调 员工管理 业务
ygglService.applicationResignation(dtO); ygglService.applicationResignation(dtO);
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -27,6 +28,20 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -27,6 +28,20 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
ZzglBmgwMService zzglBmgwMService; ZzglBmgwMService zzglBmgwMService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -63,7 +78,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -63,7 +78,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
.isdg(1) .isdg(1)
.build(); .build();
System.out.println("调岗:"+upEmpDeptDto); Logoutput("调岗:"+upEmpDeptDto);
ZzglBmgwM bmg = ZzglBmgwM.builder().build().selectOne(new QueryWrapper<ZzglBmgwM>().lambda().eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getLeader, id)); ZzglBmgwM bmg = ZzglBmgwM.builder().build().selectOne(new QueryWrapper<ZzglBmgwM>().lambda().eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getLeader, id));
if(bmg != null) { if(bmg != null) {
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
...@@ -24,6 +25,20 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -24,6 +25,20 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
private KqglService kqglService; private KqglService kqglService;
@Value("${config-8timer.environmental-science}")
public String environmental_science;
public void Logoutput(String science) {
if(!("pro").equals(environmental_science)) {
System.out.println(science);
}else {
System.out.println("");
}
}
@Override @Override
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -62,10 +77,11 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -62,10 +77,11 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
.compensate(Convert.toInt(compensate)) .compensate(Convert.toInt(compensate))
.build(); .build();
System.out.println("加班:"+oaD); Logoutput("加班:"+oaD);
// 调 考勤管理 业务-加班 // 调 考勤管理 业务-加班
kqglService.attovertimeapproval(oaD); kqglService.attovertimeapproval(oaD);
} }
} }
...@@ -8,8 +8,8 @@ server: ...@@ -8,8 +8,8 @@ server:
spring: spring:
servlet: servlet:
multipart: multipart:
max-file-size: 20MB max-file-size: 500MB
max-request-size: 20MB max-request-size: 500MB
jpa: jpa:
# 配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
...@@ -189,6 +189,7 @@ logging: ...@@ -189,6 +189,7 @@ logging:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序 # operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
config-8timer: config-8timer:
environmental-science: dev
expiration_time: 2 #扫码登录过期时长 expiration_time: 2 #扫码登录过期时长
machine8timerUrl: 'http://test-8timer-fk.youlingrc.com' machine8timerUrl: 'http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088' #machine8timerUrl: 'http://192.168.3.38:8088'
...@@ -232,5 +233,5 @@ config-8timer: ...@@ -232,5 +233,5 @@ config-8timer:
crm-excel: crm-excel:
realPath: 'D:/excel/' realPath: 'D:/excel/'
\ No newline at end of file
...@@ -8,8 +8,8 @@ server: ...@@ -8,8 +8,8 @@ server:
spring: spring:
servlet: servlet:
multipart: multipart:
max-file-size: 20MB max-file-size: 500MB
max-request-size: 20MB max-request-size: 500MB
jpa: jpa:
# 配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
...@@ -154,7 +154,7 @@ pagehelper: ...@@ -154,7 +154,7 @@ pagehelper:
#showSql #showSql
logging: logging:
level: level:
root: info root: ERROR
cn.timer.api.dao: error cn.timer.api.dao: error
pattern: pattern:
console: '--%p--%m%n' console: '--%p--%m%n'
...@@ -164,6 +164,7 @@ logging: ...@@ -164,6 +164,7 @@ logging:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序 # operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
config-8timer: config-8timer:
environmental-science: pro
expiration_time: 2 #扫码登录过期时长 expiration_time: 2 #扫码登录过期时长
machine8timerUrl: 'http://record.8timer.cn' machine8timerUrl: 'http://record.8timer.cn'
#machine8timerUrl: 'http://192.168.3.38:8088' #machine8timerUrl: 'http://192.168.3.38:8088'
...@@ -203,4 +204,5 @@ config-8timer: ...@@ -203,4 +204,5 @@ config-8timer:
# 客户管理导入服务器保存路径 # 客户管理导入服务器保存路径
crm-excel: crm-excel:
realPath: '/data/crm-excel/' realPath: '/data/crm-excel/'
\ No newline at end of file
...@@ -8,8 +8,8 @@ server: ...@@ -8,8 +8,8 @@ server:
spring: spring:
servlet: servlet:
multipart: multipart:
max-file-size: 20MB max-file-size: 500MB
max-request-size: 20MB max-request-size: 500MB
jpa: jpa:
# 配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
...@@ -163,6 +163,7 @@ logging: ...@@ -163,6 +163,7 @@ logging:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序 # operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
config-8timer: config-8timer:
environmental-science: test
expiration_time: 2 #扫码登录过期时长 expiration_time: 2 #扫码登录过期时长
machine8timerUrl: 'http://test-8timer-fk.youlingrc.com' machine8timerUrl: 'http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088' #machine8timerUrl: 'http://192.168.3.38:8088'
...@@ -202,4 +203,5 @@ config-8timer: ...@@ -202,4 +203,5 @@ config-8timer:
# 客户管理导入服务器保存路径 # 客户管理导入服务器保存路径
crm-excel: crm-excel:
realPath: '/data/crm-excel/' realPath: '/data/crm-excel/'
\ No newline at end of file
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
<delete id="deleteByPrimaryByUserid" parameterType="java.lang.Integer" > <delete id="deleteByPrimaryByUserid" parameterType="java.lang.Integer" >
delete from kqgl_asso_yhkqz delete from kqgl_asso_yhkqz
where userid = #{userid,jdbcType=INTEGER} where userid = #{userid,jdbcType=INTEGER}
and qyid = #{qyid}
</delete> </delete>
<select id="selectAttNotMember" resultMap="BaseResultMap"> <select id="selectAttNotMember" resultMap="BaseResultMap">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment