Commit fa63ee3f by 陶湘宇

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into develop

* 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200:
  8小时运营后台-- 增加保单回调是查询保单信息 导入保单时判断批改
  修改BUG 1495
  8小时后台-- 应需求一定要展示前四张图片
  8小时后台-- 解决了 Bug 导入名册页,未完成 1468
  8小时后台-- 解决了 Bug 在候选人详情页进行刷新页面操作,系统会提示用户简历信息获取失败 1491 解决了 Bug 添加员工,员工状态修改异常 1533 解决了 Bug 面试登记表中,籍贯,名族,学历中内容显示错误 1490 解决了 Bug 员工详情页新增合同信息,合同类型无展示 1488
  微信公众号(服务号)appSecret 更新
  8小时运营后台-- 增加查询条件
  8小时运营后台-- 保全支付回调
  8小时运营后台-- 保全支付回调
  8小时后台-- 导入人员时生成一个员工登录表数据
parents 7812b499 da6a2372
......@@ -25,3 +25,15 @@ ALTER TABLE yggl_main_emp`
ALTER TABLE `timer_test`.`insure_user`
ADD COLUMN `create_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间' AFTER `reason`;
CREATE TABLE ` yggl_main_importLog ` (
` id ` int(11) NOT NULL AUTO_INCREMENT,
` user_id ` int(11) NULL DEFAULT NULL COMMENT ''yggl_main_emp_empnum'',
` create_time ` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT ''导入时间'',
` success_num ` int(11) NULL DEFAULT NULL COMMENT ''成功条数'',
` err_num ` int(11) NULL DEFAULT NULL COMMENT ''失败条数'',
` org_code ` int(11) NULL DEFAULT NULL,
PRIMARY KEY (` id `) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
ALTER TABLE `timer_test`.`insure_user`
MODIFY COLUMN `apply_type` int(11) NULL DEFAULT NULL COMMENT '申请类型:1新增 2投保 3批改' AFTER `replace_trans_id`;
package cn.timer.api.bean.insure;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
......@@ -16,8 +17,9 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
......@@ -152,7 +154,7 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty(value = "替换流水号,使用trans_id,RP_开头")
private String replaceTransId;
@ApiModelProperty(value = "申请类型:1新增 2投保 3批")
@ApiModelProperty(value = "申请类型:1新增 2投保 3批")
private Integer applyType;
@ApiModelProperty(value = "批改原因")
......@@ -161,5 +163,8 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty(value = "录单时间")
private Date createTime;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "导入备注")
private String remake;
}
package cn.timer.api.bean.yggl;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
*
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-06-10 17:42:53
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name="yggl_main_import_log")
@ApiModel("员工导入记录")
public class YgglMainImportLog extends Model<YgglMainImportLog> {
private static final long serialVersionUID = -1825678752247238544L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* yggl_main_emp_empnum
*/
private Integer userId;
/**
* 导入时间
*/
private Date createTime;
/**
* 成功条数
*/
private Integer successNum;
/**
* 失败条数
*/
private Integer errNum;
/**
*
*/
private Integer orgCode;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:yggl_main_emp_id
*/
public void setUserId(Integer userId) {
this.userId = userId;
}
/**
* 获取:yggl_main_emp_id
*/
public Integer getUserId() {
return userId;
}
/**
* 设置:导入时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:导入时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:成功条数
*/
public void setSuccessNum(Integer successNum) {
this.successNum = successNum;
}
/**
* 获取:成功条数
*/
public Integer getSuccessNum() {
return successNum;
}
/**
* 设置:失败条数
*/
public void setErrNum(Integer errNum) {
this.errNum = errNum;
}
/**
* 获取:失败条数
*/
public Integer getErrNum() {
return errNum;
}
/**
* 设置:
*/
public void setOrgCode(Integer orgCode) {
this.orgCode = orgCode;
}
/**
* 获取:
*/
public Integer getOrgCode() {
return orgCode;
}
}
......@@ -17,7 +17,7 @@ import java.util.Date;
/**
* 招聘管理人才信息表
*
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-08 15:14:40
......@@ -400,4 +400,8 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
@ApiModelProperty(value = "淘汰原因")
private String failCause;
/*民族*/
@Transient
@TableField(exist = false)
private String nationName;
}
......@@ -8,6 +8,7 @@ import cn.timer.api.utils.ResultUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.mysql.cj.util.StringUtils;
import io.swagger.annotations.Api;
......@@ -96,7 +97,7 @@ public class CallBackContorll {
@PostMapping(value = "/addpPayCallBack")
@ApiOperation(value = "11.增员核保回调", httpMethod = "POST", notes = "增员核保回调")
@Transactional(rollbackFor = Exception.class)
public Map addpPayCallBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) throws IOException {
public Map addpPayCallBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) {
/*核保*/
/*如果是在线支付的话*/
Map map = Maps.newHashMap();
......@@ -173,7 +174,7 @@ public class CallBackContorll {
@PostMapping(value = "/CallBack")
@ApiOperation(value = "7.保全增员申请回调", httpMethod = "POST", notes = "投保申请回调")
@Transactional(rollbackFor = Exception.class)
public Map callBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) throws IOException {
public Map callBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) {
Map map = Maps.newHashMap();
map.put("status", "error");
if (StringUtils.isNullOrEmpty(pid) || StringUtils.isNullOrEmpty(sign) && StringUtils.isNullOrEmpty(timestamp)) {
......@@ -199,7 +200,10 @@ public class CallBackContorll {
paramsMap.put("timestamp", timestamp);
paramsMap.put("sign", sign);
CallBack callBack = JSONObject.parseObject(sb.toString(), CallBack.class);
List<InsureUser> list = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getBatchNo, callBack.getOrder_import_info().getUuid()).eq(InsureUser::getInsureStatus, 3));
List<InsureUser> list = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getTransId, callBack.getOrder_import_info().getThird_uuid()));
if(list.size()<=0){
list = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getBatchNo, callBack.getOrder_import_info().getUuid()));
}
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getPolicyNo, list.get(0).getPolicyNo()));
if (callBack.getStatus().equals("1")) {
list.forEach(i -> {
......@@ -223,7 +227,7 @@ public class CallBackContorll {
insurePolicy.setPolicyFile(callBack.getOrder_import_info().getEndorsement_file());
InsureLog.builder().requestParam(JSONObject.toJSONString(paramsMap)).type(7)
.requestData(sb.toString()).createTime(new Date()).requestType(1).returnBody(JSONObject.toJSONString(callBack)).requestPath(base_api_url + "/callBack/policy/CallBack")
.returnCode(callBack.getStatus()).returnMsg("更新成功").policyId(insurePolicy.getId()).build().insert();
.returnCode(callBack.getStatus()).returnMsg("保单增员-更新成功").policyId(insurePolicy.getId()).build().insert();
} else {
String errorMsg = "";
InsureLog insureLog = InsureLog.builder().build().selectOne(new QueryWrapper<InsureLog>().lambda().eq(InsureLog::getTransId, callBack.getOrder_import_info().getThird_uuid()));
......@@ -271,7 +275,7 @@ public class CallBackContorll {
@GetMapping(value = "/payStatus")
@ApiOperation(value = "8.支付完成跳转", httpMethod = "GET", notes = "用于支付时跳回我们系统更新状态")
@Transactional(rollbackFor = Exception.class)
public ModelAndView callBackPayStatus(HttpServletRequest request, @RequestParam Integer policyId) throws IOException {
public ModelAndView callBackPayStatus(HttpServletRequest request, @RequestParam Integer policyId) {
InsurePolicy insurePolicy = InsurePolicy.builder().id(policyId).build().selectById();
InsurePay insurePay = InsurePay.builder().id(insurePolicy.getPayId()).build().selectById();
insurePay.setPayTime(new Date());
......@@ -286,7 +290,7 @@ public class CallBackContorll {
@PostMapping(value = "/payCallBack")
@ApiOperation(value = "9.投保支付收银台回调", httpMethod = "POST", notes = "支付完成跳转")
@Transactional(rollbackFor = Exception.class)
public Map payCallBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) throws IOException {
public Map payCallBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) {
try {
InputStream is = null;
is = request.getInputStream();
......@@ -343,7 +347,7 @@ public class CallBackContorll {
@PostMapping(value = "/issueCallback")
@ApiOperation(value = "10.保单出单回调", httpMethod = "POST", notes = "支付完成跳转")
@Transactional(rollbackFor = Exception.class)
public Map issueCallback(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) throws IOException {
public Map issueCallback(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) {
try {
InputStream is = null;
is = request.getInputStream();
......@@ -397,9 +401,9 @@ public class CallBackContorll {
}
@PostMapping(value = "/batchPayCallback")
@ApiOperation(value = "增员支付回调-保司接口没启用", httpMethod = "POST", notes = "增员支付回调")
@ApiOperation(value = "增员支付回调", httpMethod = "POST", notes = "增员支付回调")
@Transactional(rollbackFor = Exception.class)
public Map batchPayCallback(HttpServletRequest request) throws IOException {
public Map batchPayCallback(HttpServletRequest request,@RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) {
try {
InputStream is = null;
......@@ -409,6 +413,10 @@ public class CallBackContorll {
for (int n; (n = is.read(b)) != -1; ) {
sb.append(new String(b, 0, n));
}
String value = DigestUtils.md5Hex(pid + secretq + timestamp + sb.toString());
if (!value.equals(sign)) {
throw new CustomException("增员支付回调验签失败");
}
BatchPayCallBack callBack = JSONObject.parseObject(sb.toString(), BatchPayCallBack.class);
InsurePay insurePay = InsurePay.builder().build().selectOne(new QueryWrapper<InsurePay>().lambda().eq(InsurePay::getSerialNumber, callBack.getOrder_import_uuid()));
if (insurePay != null) {
......
......@@ -2,10 +2,12 @@ package cn.timer.api.controller.insure;
import cn.timer.api.bean.insure.*;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.enums.Regular;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.controller.insure.enums.PlanEnum;
......@@ -113,6 +115,8 @@ public class InsureContorll {
@Value("${insure.cancelPayment}")
private String cancelPayment;
@Value(value = "${config-8timer.init-password}")
private String pwd;
private static SimpleDateFormat dtf3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
......@@ -546,8 +550,11 @@ public class InsureContorll {
YgglMainEmp y = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getName, insureDto.getUserName()).eq(YgglMainEmp::getZjNum, insureDto.getIdCardNo()));
if (y == null) {
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(String.valueOf(System.currentTimeMillis())).pw(Md5.md5(pwd)).regTime(new Date()).orgId(Integer.parseInt(insureDto.getOrgCode())).username(insureDto.getUserName()).sts(CommonEnum.U_STS_ON.getType()).build();
qyzxEmpLogin.insert();
y = new YgglMainEmp();
y.setName(insureDto.getUserName());
y.setEmpNum(qyzxEmpLogin.getId());
y.setZjType(0);
y.setZjNum(insureDto.getIdCardNo());
y.setOrgCode(Integer.parseInt(insureDto.getOrgCode()));
......@@ -795,7 +802,11 @@ public class InsureContorll {
for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) {
XSSFCell titleCell = titleRow.getCell(index);
XSSFCell cell = row.getCell(index);
cell.setCellType(CellType.STRING);
if (cell == null) {
continue;
} else {
cell.setCellType(CellType.STRING);
}
if (cell.getStringCellValue().equals("")) {
continue;
}
......@@ -851,7 +862,12 @@ public class InsureContorll {
List<String> idNumList = userList.stream().map(YgglMainEmp::getZjNum).collect(Collectors.toList());
List<YgglMainEmp> newList = yg.stream().filter(v -> !idNumList.contains(v.getZjNum())).collect(Collectors.toList());
if (newList.size() > 0) {
newList.forEach(u -> u.insert());
newList.forEach(u ->{
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(String.valueOf(System.currentTimeMillis())).pw(Md5.md5(pwd)).regTime(new Date()).orgId(company.getId()).username(u.getName()).sts(CommonEnum.U_STS_ON.getType()).build();
qyzxEmpLogin.insert();
u.setEmpNum(qyzxEmpLogin.getId());
u.insert();
});
}
allList = ygglMainEmpMapper.selectListByIZjNum(yg.stream().map(YgglMainEmp::getZjNum).toArray(String[]::new), company.getId());
selectUserList = allList.stream().filter(s -> s.getIsInsure() == 0).collect(Collectors.toList());
......@@ -900,7 +916,11 @@ public class InsureContorll {
for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) {
XSSFCell titleCell = titleRow.getCell(index);
XSSFCell cell = row.getCell(index);
cell.setCellType(CellType.STRING);
if (cell == null) {
continue;
} else {
cell.setCellType(CellType.STRING);
}
if (cell.getStringCellValue().equals("")) {
continue;
}
......@@ -1091,6 +1111,11 @@ public class InsureContorll {
case "总保费":
user.setPrice(ExcelUtils.getString(cell));
break;
case "备注":
if(!StringUtils.isNullOrEmpty(ExcelUtils.getString(cell))){
user.setRemake(ExcelUtils.getString(cell));
}
break;
}
}
userList.add(user);
......@@ -1109,6 +1134,9 @@ public class InsureContorll {
if (!dataMap.get("product_code").equals(insureProduct.getProductCodeId())) {
return ResultUtil.error("导入的保单产品和选择的保单产品不一致");
}
if(!dataMap.get("corporate_applicant_name").equals(company.getName())){
return ResultUtil.error("导入的保单投保人和企业投保人不一样");
}
policy.setProductId(insureProduct.getId());
policy.setPolicyFile(dataMap.get("policy_file").toString());
policy.setStatus("1");
......@@ -1144,8 +1172,11 @@ public class InsureContorll {
}
insureUser.setInsuredMobile(ygglMainEmp.getPhone());
} else {
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(String.valueOf(System.currentTimeMillis())).pw(Md5.md5(pwd)).regTime(new Date()).orgId(insureUser.getOrgCode()).username(insureUser.getInsuredEContact()).sts(CommonEnum.U_STS_ON.getType()).build();
qyzxEmpLogin.insert();
/*如果不存在员工就创建一名员工*/
ygglMainEmp = new YgglMainEmp();
ygglMainEmp.setEmpNum(qyzxEmpLogin.getId());
ygglMainEmp.setName(insureUser.getInsuredEContact());
ygglMainEmp.setZjType(0);
ygglMainEmp.setZjNum(insureUser.getInsuredNo());
......@@ -1160,7 +1191,26 @@ public class InsureContorll {
insureUser.setStatus("1");
insureUser.setCreateTime(new Date());
insureUser.insert();
/*判断批改状态*/
if(insureUser.getApplyType()==3){
if(StringUtils.isNullOrEmpty(insureUser.getRemake())){
return ResultUtil.data("批改状态下备注不能为空");
}
if(insureUser.getRemake().indexOf("被保险人信息批改-原被保险人,")!=-1){
String newStr= insureUser.getRemake().substring(insureUser.getRemake().indexOf(",")+1,insureUser.getRemake().length());
String[] arr = newStr.split("/");
if(arr[0].equals(insureUser.getInsuredEContact())&&arr[2].equals(insureUser.getInsuredNo())){
return ResultUtil.data("批改状态下替换人和被替换人不能相同");
}
/*更新人员投保状态*/
InsureUser.builder().status("2").insureStatus(2).build().update(new QueryWrapper<InsureUser>()
.lambda().eq(InsureUser::getInsuredNo,arr[2]).eq(InsureUser::getInsuredEContact,arr[0]));
ygglMainEmp.builder().isInsure(2).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getId,insureUser.getUserId()));
}
}
}
InsureLog.builder().requestParam(JSONObject.toJSONString(map)).type(9).createTime(new Date()).requestType(2).returnBody(data).requestPath(policyDetailUrl)
.returnCode(returnMap.get("errcode").toString()).returnMsg(returnMap.get("errmsg").toString()).policyId(policy.getId()).build().insert();
} catch (IOException e) {
......@@ -1202,7 +1252,11 @@ public class InsureContorll {
for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) {
XSSFCell titleCell = titleRow.getCell(index);
XSSFCell cell = row.getCell(index);
cell.setCellType(CellType.STRING);
if (cell == null) {
continue;
} else {
cell.setCellType(CellType.STRING);
}
switch (ExcelUtils.getString(titleCell)) {
case "被保人姓名(必填)":
if (StringUtils.isNullOrEmpty(ExcelUtils.getString(cell))) {
......@@ -1255,7 +1309,10 @@ public class InsureContorll {
y = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getZjNum, iu.getInsuredNo())
.eq(YgglMainEmp::getName, iu.getInsuredEContact()).eq(YgglMainEmp::getOrgCode, qyzxEntInfoM.getId()));
if (y == null) {
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().pw(Md5.md5(pwd)).phone(String.valueOf(System.currentTimeMillis())).regTime(new Date()).orgId(qyzxEntInfoM.getId()).username(iu.getInsuredEContact()).sts(CommonEnum.U_STS_ON.getType()).build();
qyzxEmpLogin.insert();
y = new YgglMainEmp();
y.setEmpNum(qyzxEmpLogin.getId());
y.setName(iu.getInsuredEContact());
y.setZjType(0);
y.setZjNum(iu.getInsuredNo());
......@@ -1321,7 +1378,6 @@ public class InsureContorll {
}
} else {
/*保全支付*/
toPayParamsMap = setParams(batchToPayUrl, appidq, secretq);
toPayParamsMap.put("order_import_uuid", insurePay.getSerialNumber());
String returnPay = HttpUtils.sendPost(batchToPayUrl, setParams(JSONObject.toJSONString(toPayParamsMap), appidq, secretq), toPayParamsMap);
Map<String, Object> payDataMap = JSONObject.parseObject(returnPay);
......@@ -1332,7 +1388,10 @@ public class InsureContorll {
insurePay.updateById();
InsureLog.builder().requestParam(JSONObject.toJSONString(toPayParamsMap)).returnBody(returnPay).type(7).createTime(new Date()).requestType(2).requestPath(batchToPayUrl)
.returnMsg("请求保全支付").policyId(insurePolicy.getId()).build().insert();
return ResultUtil.data(importPayInfo.get("pay_url").toString() + "&jump_url=" + base_api_url + "/callBack/policy/payStatus?policyId=" + insurePolicy.getId() + "&notify_url=" + base_api_url + "/callBack/policy/batchPayCallback");
/*设置验签参数*/
long timestamp = System.currentTimeMillis() / 1000;
String sign= DigestUtils.md5Hex(appidq + secretq + timestamp);
return ResultUtil.data(importPayInfo.get("pay_url").toString() + "&jump_url=" + base_api_url + "/callBack/policy/payStatus?policyId=" + insurePolicy.getId() + "&notify_url=" + base_api_url + "/callBack/policy/batchPayCallback&pid="+appidq+"&sign="+sign+"&timestamp="+timestamp);
}
} catch (Exception e) {
log.error("重新发起支付异常:", e);
......
package cn.timer.api.controller.qyxx;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import java.util.*;
import cn.timer.api.utils.redis.RedisUtil;
import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
......@@ -88,18 +85,27 @@ public class CmsController {
*/
@GetMapping(value = "/zxqyxx")
@ApiOperation(value = "获取最新讯息的标题、发布时间", httpMethod = "GET", notes = "接口发布说明")
public Result<List<CmsContent>> groupbyTime(@CurrentUser UserBean userBean) {
public Result<Object> groupbyTime(@CurrentUser UserBean userBean) {
Map map = Maps.newHashMap();
Integer orgCode = userBean.getOrgCode();
QueryWrapper<CmsContent> queryWrapper = new QueryWrapper<>();
queryWrapper.select("id", "title", "author", "releasetime", "fmtpath").eq("releasestate", 0)
.eq("organization_id", orgCode).orderByDesc("releasetime").last("limit 6");
List<CmsContent> qynr = CmsContent.builder().build().selectList(queryWrapper);
return ResultUtil.data(qynr, "查询分类成功!");
/*应需求一定要展示前四张图片*/
QueryWrapper<CmsContent> qw = new QueryWrapper<>();
qw.select("fmtpath").eq("releasestate", 0).isNotNull("fmtpath").ne("fmtpath","")
.eq("organization_id", orgCode).orderByDesc("releasetime").last("limit 4");
List<CmsContent> picList = CmsContent.builder().build().selectList(qw);
map.put("list",qynr);
map.put("picList",picList);
return ResultUtil.data(map, "查询分类成功!");
}
/**
* 分类,获取标题和发布时间
*
*
*/
// @GetMapping(value = "/flhqqyxx")
// @ApiOperation(value = "获取首页分类讯息标题、发布时间", httpMethod = "GET", notes = "接口发布说明")
......@@ -132,7 +138,7 @@ public class CmsController {
/**
* 分类内容获取
*
*
*/
@GetMapping(value = "/getType")
@ApiOperation(value = "分类内容获取", httpMethod = "GET", notes = "接口发布说明")
......@@ -158,7 +164,7 @@ public class CmsController {
/**
* 获取分类
*
*
*/
@GetMapping(value = "/xxfl")
@ApiOperation(value = "获取分类", httpMethod = "GET", notes = "接口发布说明")
......@@ -321,7 +327,7 @@ public class CmsController {
cmsContentPage.getSize();
return ResultUtil.data(cmsContentPage, cmsContents, "企业OA讯息搜索成功");
}
/**
* 企业OA讯息查询
*/
......@@ -357,7 +363,7 @@ public class CmsController {
/**
* 根据id查讯息
*
*
* @param id
* @return
*/
......@@ -413,7 +419,7 @@ public class CmsController {
/**
* 讯息发布
*
*
* @param id
*/
@GetMapping(value = "/qyxxsdfb/{id}")
......@@ -432,7 +438,7 @@ public class CmsController {
/**
* 讯息收回
*
*
* @param id
*/
@GetMapping(value = "/qyxxtb/{id}")
......@@ -451,7 +457,7 @@ public class CmsController {
/**
* 添加已读
*
*
* @param userBean
* @param id
* @return
......@@ -477,7 +483,7 @@ public class CmsController {
/**
* 查询已读人
*
*
* @param userBean
* @param mid
* @return
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package cn.timer.api.controller.zpgl;
import cn.hutool.core.util.StrUtil;
import cn.timer.api.bean.clazz.NationClass;
import cn.timer.api.bean.kqgl.UserEquiRelation;
import cn.timer.api.bean.kqmk.*;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
......@@ -501,6 +502,7 @@ public class ZpglController {
@ApiParam("人才信息ID") @RequestParam(required = false) Integer zpglRcxxId) {
try {
ZpglRcxx zpglRcxx = ZpglRcxx.builder().id(zpglRcxxId).build().selectById();
zpglRcxx.setNationName(NationClass.builder().id(zpglRcxx.getNationClassId()).build().selectById().getName());
// 工作经验
List<ZpglRcxxExperience> zpglRcxxExperiences = ZpglRcxxExperience.builder().build().selectList(
new QueryWrapper<ZpglRcxxExperience>().lambda().eq(ZpglRcxxExperience::getZpglRcxxId, zpglRcxxId)
......
......@@ -524,7 +524,7 @@ public class ZpglServiceImpl implements ZpglService {
return ResultUtil.error("导入简历失败,手机号码不存在~");
}
// 查询简历是否重复导入
ZpglRcxx zpglRcxxEntiyt = ZpglRcxx.builder().build().selectOne(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getMobile, phone).eq(ZpglRcxx::getDeleteFlag, 0));
ZpglRcxx zpglRcxxEntiyt = ZpglRcxx.builder().build().selectOne(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getOrgCode, userBean.getOrgCode()).eq(ZpglRcxx::getMobile, phone).eq(ZpglRcxx::getDeleteFlag, 0));
if (!StringUtils.isEmpty(zpglRcxxEntiyt)) {
return ResultUtil.error("简历已入库,请勿重复导入");
}
......
package cn.timer.api.dao.yggl;
import cn.timer.api.bean.yggl.YgglMainImportLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
*
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-06-10 17:42:53
*/
@Repository
public interface YgglMainImportlogMapper extends BaseMapper<YgglMainImportLog> {
}
/**
* @date 2019年11月16日
* @date 2019年11月16日
* @author 翁东州
* @方法中文名称:
*/
......@@ -24,7 +24,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @date 2019年11月16日
* @date 2019年11月16日
* @author 翁东州
* @方法中文名称:
*/
......@@ -33,7 +33,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
public class AddygdaDto extends Page implements Serializable{
private static final long serialVersionUID = -1230023773946170942L;
@NotBlank(message = ValidationMsg.NOTBLANK)
......@@ -44,38 +44,38 @@ public class AddygdaDto extends Page implements Serializable{
@Pattern(regexp=Regular.PHONE,message = ValidationMsg.PATTERN)
@ApiModelProperty(value="手机号",example="101")
private String phone;
/*@NotNull(message = ValidationMsg.NOTNULL)*/
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="0")
private Integer zjType;
/*@NotBlank(message = ValidationMsg.NOTBLANK)*/
@ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum;
/*@NotNull(message = ValidationMsg.NOTNULL)*/
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType;
// @NotNull(message = ValidationMsg.NOTNULL)
@JSONField(format="yyyy-MM-dd")
@JSONField(format="yyyy-MM-dd")
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime;
/*@NotNull(message = ValidationMsg.NOTNULL)*/
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="0")
private Integer syq;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex;
@ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId;
@ApiModelProperty(value="自定义工号",example="1001")
private String customNum;
@ApiModelProperty(value="考勤组id",example="0")
private Integer attgroupid;
......@@ -84,6 +84,12 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="对应工作地点典ID",example="0")
private Integer zpglGzddId;
@ApiModelProperty(value = "员工状态 0试用、1正式、2离职中、3已离职",example = "0")
private Integer jobStatus;
@JSONField(format="yyyy-MM-dd")
@ApiModelProperty(value="离职日期 ",example="客户注册后的时间为入职时间")
private Date lzTime;
}
......@@ -269,7 +269,7 @@ sftp:
wxgzh:
appid: 'wxd331ab19a67e2319'
appSecret: '31259f6fee0c0771d6f48c3d5159c551'
appSecret: '7032afbdb4235a45e2400b98a8ec4763'
#我方token 在微信公众号基本配置里面配置( token = 8timer123 md5加密得)
token: 'af37997effca937229453180e830b164'
#消息加解密密钥
......
......@@ -254,7 +254,7 @@ sftp:
#微信公众号(服务号)
wxgzh:
appid: 'wxd331ab19a67e2319'
appSecret: '31259f6fee0c0771d6f48c3d5159c551'
appSecret: '7032afbdb4235a45e2400b98a8ec4763'
#我方token 在微信公众号基本配置里面配置( token = 8timer123 md5加密得)
token: 'af37997effca937229453180e830b164'
#消息加解密密钥
......
......@@ -247,7 +247,7 @@ sftp:
#微信公众号(服务号)
wxgzh:
appid: 'wxd331ab19a67e2319'
appSecret: '31259f6fee0c0771d6f48c3d5159c551'
appSecret: '7032afbdb4235a45e2400b98a8ec4763'
#我方token 在微信公众号基本配置里面配置( token = 8timer123 md5加密得)
token: 'af37997effca937229453180e830b164'
#消息加解密密钥
......
......@@ -298,6 +298,12 @@
<if test="policy.policyDateStart!=null and policy.policyDateStart!=''">
and ip.policy_date_start <![CDATA[ >= ]]> #{policy.policyDateStart}
</if>
<if test="policy.companyName!=null and policy.companyName!=''">
and qy.name like CONCAT('%',#{policy.companyName},'%')
</if>
<if test="policy.policyNo!=null and policy.policyNo!=''">
and ip.policy_no like CONCAT('%',#{policy.policyNo},'%')
</if>
</where>
</select>
......
<?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="cn.timer.api.dao.yggl.YgglMainImportlogMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.yggl.YgglMainImportLog" id="ygglMainImportlogMap">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="createTime" column="create_time"/>
<result property="successNum" column="success_num"/>
<result property="errNum" column="err_num"/>
<result property="orgCode" column="org_code"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.yggl.YgglMainImportLog">
select *
from yggl_main_importLog
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.yggl.YgglMainImportLog">
select * from yggl_main_importLog
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="userId != null and userId != ''">AND `user_id` = #{userId}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="successNum != null and successNum != ''">AND `success_num` = #{successNum}</if>
<if test="errNum != null and errNum != ''">AND `err_num` = #{errNum}</if>
<if test="orgCode != null and orgCode != ''">AND `org_code` = #{orgCode}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from yggl_main_importLog
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="userId != null and userId != ''">AND `user_id` = #{userId}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="successNum != null and successNum != ''">AND `success_num` = #{successNum}</if>
<if test="errNum != null and errNum != ''">AND `err_num` = #{errNum}</if>
<if test="orgCode != null and orgCode != ''">AND `org_code` = #{orgCode}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
insert into yggl_main_importLog
(`id`,
`user_id`,
`create_time`,
`success_num`,
`err_num`,
`org_code`)
values (#{id},
#{userId},
#{createTime},
#{successNum},
#{errNum},
#{orgCode})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
insert into yggl_main_importLog
(
<if test="id != null">`id`</if>
<if test="userId != null">,`user_id`</if>
<if test="createTime != null">,`create_time`</if>
<if test="successNum != null">,`success_num`</if>
<if test="errNum != null">,`err_num`</if>
<if test="orgCode != null">,`org_code`</if>
)
values
(
<if test="id != null">#{id}</if>
<if test="userId != null">,#{userId}</if>
<if test="createTime != null">,#{createTime}</if>
<if test="successNum != null">,#{successNum}</if>
<if test="errNum != null">,#{errNum}</if>
<if test="orgCode != null">,#{orgCode}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
insert into yggl_main_importLog
(
`id`,
`user_id`,
`create_time`,
`success_num`,
`err_num`,
`org_code`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.userId},
#{item.createTime},
#{item.successNum},
#{item.errNum},
#{item.orgCode}
)
</foreach>
</insert>
<update id="update" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
update yggl_main_importLog
<set>
<if test="userId != null">`user_id` = #{userId},</if>
<if test="createTime != null">`create_time` = #{createTime},</if>
<if test="successNum != null">`success_num` = #{successNum},</if>
<if test="errNum != null">`err_num` = #{errNum},</if>
<if test="orgCode != null">`org_code` = #{orgCode}</if>
</set>
where id = #{id}
</update>
<delete id="delete">
delete
from yggl_main_importLog
where id = #{value}
</delete>
<delete id="deleteBatch">
delete from yggl_main_importLog where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
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