Commit 903418a7 by 邓实川

Merge branch 'develop' of http://120.24.24.239:8082/8timerv2/8timerapiv200.git into dsc

parents f5006eaf 6a564afb
...@@ -3,19 +3,16 @@ package cn.timer.api.aspect; ...@@ -3,19 +3,16 @@ package cn.timer.api.aspect;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature; import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BeanPropertyBindingResult;
import org.springframework.validation.BindingResult;
import org.springframework.validation.ObjectError; import org.springframework.validation.ObjectError;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -23,7 +20,6 @@ import com.alibaba.fastjson.JSONObject; ...@@ -23,7 +20,6 @@ import com.alibaba.fastjson.JSONObject;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Console; import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ClassUtil; import cn.hutool.core.util.ClassUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.aspect.lang.annotation.BindingResultCtrol; import cn.timer.api.aspect.lang.annotation.BindingResultCtrol;
import cn.timer.api.aspect.lang.bean.ValidationError; import cn.timer.api.aspect.lang.bean.ValidationError;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
...@@ -37,25 +33,38 @@ import cn.timer.api.utils.ResultUtil; ...@@ -37,25 +33,38 @@ import cn.timer.api.utils.ResultUtil;
@Component @Component
public class BindingResultAspect { public class BindingResultAspect {
// 配置织入点 // @annotation配置织入点
@Pointcut("@annotation(cn.timer.api.aspect.lang.annotation.BindingResultCtrol)") // @Pointcut("@annotation(cn.timer.api.aspect.lang.annotation.BindingResultCtrol)")
public void bindingResultPointCut() // public void bindingResultPointCut()
{ // {
// }
// execution 配置织入点 -匹配 cn.timer.api.controller 包下的所有子包的类的方法
@Pointcut("execution(* cn.timer.api.controller.spmk.*.*(..))")
public void clazzPointCut(){
} }
@Before("bindingResultPointCut()") //
public void doBefore(JoinPoint point) throws Throwable // @Before("bindingResultPointCut()")
{ // public void doBefore(JoinPoint point) throws Throwable
//预留 // {
// //预留
// handleDataScope(point); // handleDataScope(point);
} // }
@Around("bindingResultPointCut() && args(..,bindingResult)") // @Around("bindingResultPointCut() && args(..,bindingResult)")
public Object doAround(ProceedingJoinPoint joinPoint,BindingResult bindingResult) throws Throwable { @Around("clazzPointCut()")
public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
Long startTime = System.currentTimeMillis(); Long startTime = System.currentTimeMillis();
Object retVal; Object retVal;
if(bindingResult.hasErrors()){ Object[] objs = joinPoint.getArgs();
List<ObjectError> ls = bindingResult.getAllErrors(); List<Object> listObj = CollectionUtil.toList(objs);
BeanPropertyBindingResult optional = (BeanPropertyBindingResult)listObj.stream()
.filter(p -> "BeanPropertyBindingResult".equals(ClassUtil.getClassName(p, true)))
.findFirst()
.orElse(null);
if(optional != null && optional.hasErrors()){
List<ObjectError> ls = optional.getAllErrors();
List<ValidationError> listVe = new ArrayList<ValidationError>(); List<ValidationError> listVe = new ArrayList<ValidationError>();
ValidationError ve; ValidationError ve;
for (ObjectError one : ls) { for (ObjectError one : ls) {
...@@ -65,9 +74,9 @@ public class BindingResultAspect { ...@@ -65,9 +74,9 @@ public class BindingResultAspect {
fieldString = fieldString.substring(fieldString.lastIndexOf(".") + 1); fieldString = fieldString.substring(fieldString.lastIndexOf(".") + 1);
} }
for (String str : one.getCodes()) { // for (String str : one.getCodes()) {
System.err.println(str); // System.err.println(str);
} // }
ve = ValidationError.builder().field(fieldString).msg(one.getDefaultMessage()).build(); ve = ValidationError.builder().field(fieldString).msg(one.getDefaultMessage()).build();
listVe.add(ve); listVe.add(ve);
...@@ -80,6 +89,7 @@ public class BindingResultAspect { ...@@ -80,6 +89,7 @@ public class BindingResultAspect {
Console.log("返回内容 {}: " ,JSONObject.toJSONString(retVal)); Console.log("返回内容 {}: " ,JSONObject.toJSONString(retVal));
Long endtime = System.currentTimeMillis(); Long endtime = System.currentTimeMillis();
Console.log("执行耗时为{}:" ,endtime-startTime + "ms"); Console.log("执行耗时为{}:" ,endtime-startTime + "ms");
return retVal; return retVal;
} }
......
package cn.timer.api.aspect.lang.bean; package cn.timer.api.aspect.lang.bean;
import cn.timer.api.bean.spmk.SpmkApprovalG;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
......
...@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor; ...@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Table(name="qyzx_invoice_data") @Table(name="qyzx_invoice_usual")
@ApiModel("发票资料表") @ApiModel("常用发票资料表")
public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
private static final long serialVersionUID = 2890357568571822258L; private static final long serialVersionUID = 2890357568571822258L;
...@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{ ...@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty(value="邮箱",example="13144400255@163.com") @ApiModelProperty(value="邮箱",example="13144400255@163.com")
private String email; private String email;
@ApiModelProperty(value="收货地区",example="广东省广州市白云区")
private String shippingArea;
@ApiModelProperty(value="收货地址",example="白云东平伯曼酒店") @ApiModelProperty(value="收货地址",example="白云东平伯曼酒店")
private String shippingAddress; private String shippingAddress;
......
...@@ -70,7 +70,7 @@ public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> { ...@@ -70,7 +70,7 @@ public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> {
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "1") @ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪", example = "1")
private Integer assoType; private Integer assoType;
@ApiModelProperty(value = "审批表单 ", example = "审批表单") @ApiModelProperty(value = "审批表单 ", example = "审批表单")
......
...@@ -73,7 +73,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -73,7 +73,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty(value = "历史审批人 ", example = "历史审批人") @ApiModelProperty(value = "历史审批人 ", example = "历史审批人")
private String historyApprover; private String historyApprover;
@ApiModelProperty(value = "关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "5") @ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪", example = "1")
private Integer assoType; private Integer assoType;
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
......
...@@ -73,8 +73,11 @@ public class SpmkCustomApproval extends Model<SpmkCustomApproval> { ...@@ -73,8 +73,11 @@ public class SpmkCustomApproval extends Model<SpmkCustomApproval> {
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "1") @ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪", example = "1")
private Integer assoType; private Integer assoType;
@ApiModelProperty(value = "可见范围 0部分可见 1所有可见 2禁用", example = "1")
private Integer isAllvisible;
@ApiModelProperty(value = "审批表单 ", example = "审批表单") @ApiModelProperty(value = "审批表单 ", example = "审批表单")
private byte[] froms; private byte[] froms;
......
...@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="转正备注 ",example="转正备注") @ApiModelProperty(value="转正备注 ",example="转正备注")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101") @ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101") @ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101")
......
...@@ -65,8 +65,11 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -65,8 +65,11 @@ public class WebSecurityConfig implements WebMvcConfigurer {
// WriteNullStringAsEmpty 将字符串类型字段的空值输出为空字符串 "" // WriteNullStringAsEmpty 将字符串类型字段的空值输出为空字符串 ""
// WriteNullNumberAsZero 将数值类型字段的空值输出为0 // WriteNullNumberAsZero 将数值类型字段的空值输出为0
// WriteNullBooleanAsFalse 将Boolean类型字段的空值输出为false // WriteNullBooleanAsFalse 将Boolean类型字段的空值输出为false
fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat, SerializerFeature.WriteNullListAsEmpty, fastJsonConfig.setSerializerFeatures(
SerializerFeature.WriteNullStringAsEmpty); SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue,
SerializerFeature.WriteDateUseDateFormat,
SerializerFeature.WriteNullStringAsEmpty);
// 处理中文乱码问题 // 处理中文乱码问题
List<MediaType> fastMediaTypes = new ArrayList<>(); List<MediaType> fastMediaTypes = new ArrayList<>();
fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8); fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
......
package cn.timer.api.config.specification;
import java.util.List;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import org.springframework.data.jpa.domain.Specification;
public class SimpleSpecification<T> implements Specification<T> {
private static final long serialVersionUID = 9090560756576906120L;
/**
* 查询的条件列表,是一组列表
*/
private List<SpecificationOperator> opers;
public SimpleSpecification(List<SpecificationOperator> opers) {
this.opers = opers;
}
@Override
public Predicate toPredicate(Root<T> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
int index = 0;
// 通过resultPre来组合多个条件
Predicate resultPre = null;
for (SpecificationOperator op : opers) {
if (index++ == 0) {
resultPre = generatePredicate(root, criteriaBuilder, op);
continue;
}
Predicate pre = generatePredicate(root, criteriaBuilder, op);
if (pre == null)
continue;
if ("and".equalsIgnoreCase(op.getJoin())) {
resultPre = criteriaBuilder.and(resultPre, pre);
} else if ("or".equalsIgnoreCase(op.getJoin())) {
resultPre = criteriaBuilder.or(resultPre, pre);
}
}
return resultPre;
}
/**
* 根据不同的操作符返回特定的查询
*/
private Predicate generatePredicate(Root<T> root, CriteriaBuilder criteriaBuilder, SpecificationOperator op) {
if ("=".equalsIgnoreCase(op.getOper())) {
System.out.println(op.getKey() + "," + op.getValue());
return criteriaBuilder.equal(root.get(op.getKey()), op.getValue());
} else if (">=".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.ge(root.get(op.getKey()), (Number) op.getValue());
} else if ("<=".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.le(root.get(op.getKey()), (Number) op.getValue());
} else if (">".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.gt(root.get(op.getKey()), (Number) op.getValue());
} else if ("<".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.lt(root.get(op.getKey()), (Number) op.getValue());
} else if (":".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.like(root.get(op.getKey()), "%" + op.getValue() + "%");
} else if ("l:".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.like(root.get(op.getKey()), op.getValue() + "%");
} else if (":l".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.like(root.get(op.getKey()), "%" + op.getValue());
} else if ("null".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.isNull(root.get(op.getKey()));
} else if ("!null".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.isNotNull(root.get(op.getKey()));
} else if ("!=".equalsIgnoreCase(op.getOper())) {
return criteriaBuilder.notEqual(root.get(op.getKey()), op.getValue());
}
return null;
}
}
package cn.timer.api.config.specification;
import java.util.ArrayList;
import java.util.List;
import org.springframework.data.jpa.domain.Specification;
/**
* Created by Tang on 2019/11/4.
*/
public class SimpleSpecificationBuilder<T> {
/**
* 条件列表
*/
private List<SpecificationOperator> opers;
/**
* 构造函数,初始化的条件是and
*/
public SimpleSpecificationBuilder(String key, String oper, Object value) {
SpecificationOperator so = new SpecificationOperator();
so.setJoin("and");
so.setKey(key);
so.setOper(oper);
so.setValue(value);
opers = new ArrayList<SpecificationOperator>();
opers.add(so);
}
public SimpleSpecificationBuilder() {
opers = new ArrayList<SpecificationOperator>();
}
/**
* 完成条件的添加
*
* @return
*/
@SuppressWarnings("rawtypes")
public SimpleSpecificationBuilder add(String key, String oper, Object value, String join) {
SpecificationOperator so = new SpecificationOperator();
so.setKey(key);
so.setValue(value);
so.setOper(oper);
so.setJoin(join);
opers.add(so);
return this;
}
/**
* 添加or条件的重载
*
* @return this,方便后续的链式调用
*/
@SuppressWarnings("rawtypes")
public SimpleSpecificationBuilder addOr(String key, String oper, Object value) {
return this.add(key, oper, value, "or");
}
/**
* 添加and的条件
*
* @return
*/
@SuppressWarnings("rawtypes")
public SimpleSpecificationBuilder add(String key, String oper, Object value) {
return this.add(key, oper, value, "and");
}
@SuppressWarnings("rawtypes")
public Specification generateSpecification() {
Specification<T> specification = new SimpleSpecification<T>(opers);
return specification;
}
}
\ No newline at end of file
package cn.timer.api.config.specification;
/**
* Created by konghao on 2016/12/15.
* 操作符类,这个类中存储了键值对和操作符号,另外存储了连接下一个条件的类型是and还是or 创建时通过
* id>=7,其中id就是key,>=就是oper操作符,7就是value 特殊的自定义几个操作符(:表示like %v%,b:表示v%,:b表示%v)
*/
public class SpecificationOperator {
/**
* 操作符的key,如查询时的name,id,address..之类
*/
private String key;
/**
* 操作符的value,具体要查询的值
*/
private Object value;
/**
* 操作符,自己定义的一组操作符,用来方便查询
*/
private String oper;
/**
* 连接的方式:and或者or
*/
private String join;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
public String getOper() {
return oper;
}
public void setOper(String oper) {
this.oper = oper;
}
public String getJoin() {
return join;
}
public void setJoin(String join) {
this.join = join;
}
}
\ No newline at end of file
...@@ -38,6 +38,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM; ...@@ -38,6 +38,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper; import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper; import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
...@@ -426,6 +427,10 @@ public class LoginController { ...@@ -426,6 +427,10 @@ public class LoginController {
} }
return ResultUtil.error("修改手机号/用户名失败"); return ResultUtil.error("修改手机号/用户名失败");
} }
@Autowired
SpmkServiceImpl SpmkService;
/** /**
* 注册企业 * 注册企业
...@@ -509,7 +514,9 @@ public class LoginController { ...@@ -509,7 +514,9 @@ public class LoginController {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("注册企业失败4"); return ResultUtil.error("注册企业失败4");
} }
SpmkService.createCustomApproval(qyzxEntInfoM.getId());
return ResultUtil.success("注册企业成功"); return ResultUtil.success("注册企业成功");
} catch (Exception e) { } catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
......
package cn.timer.api.controller.kqgl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.timer.api.dto.kqgl.CompensateDto;
import cn.timer.api.dto.kqgl.LeaveTypeDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0考勤模块")
@RestController
@Transactional
@RequestMapping(value = "/kqmk", produces = { "application/json", "multipart/form-data" })
public class TimeCardController {
/**
* 查询列表-假期规则
*/
@GetMapping(value = "/list_leave_rules")
@ApiOperation(value = "1: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
@ApiOperationSupport(order = 1)
public Result<Object> selectListLeaveRules() {
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
LeaveTypeDto lea = LeaveTypeDto.builder().build();
lea.setId(1);
lea.setValue("事假");
leas.add(lea);
LeaveTypeDto lea2 = LeaveTypeDto.builder().build();
lea2.setId(2);
lea2.setValue("调休");
leas.add(lea2);
LeaveTypeDto lea3 = LeaveTypeDto.builder().build();
lea3.setId(3);
lea3.setValue("病假");
leas.add(lea3);
return ResultUtil.data(leas, "操作成功!");
}
/**
* 查询列表-加班补偿方式
*/
@GetMapping(value = "/list_compensate")
@ApiOperation(value = "2: 查询列表-加班补偿方式", httpMethod = "GET", notes = " 查询列表-加班补偿方式")
@ApiOperationSupport(order = 1)
public Result<Object> selectListCompensate() {
List<CompensateDto> coms = new ArrayList<CompensateDto>();
CompensateDto com = CompensateDto.builder().build();
com.setId(1);
com.setValue("加班费");
coms.add(com);
CompensateDto coms2 = CompensateDto.builder().build();
coms2.setId(2);
coms2.setValue("调休");
coms.add(coms2);
return ResultUtil.data(coms, "操作成功!");
}
}
...@@ -39,7 +39,6 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM; ...@@ -39,7 +39,6 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper; import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper; import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.qyzx.QyzxEntAuthMapper; import cn.timer.api.dao.qyzx.QyzxEntAuthMapper;
...@@ -230,8 +229,16 @@ public class QyzxController { ...@@ -230,8 +229,16 @@ public class QyzxController {
@GetMapping(value = "/invoiceusual") @GetMapping(value = "/invoiceusual")
@ApiOperation(value = "显示常用的企业开票资料", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "显示常用的企业开票资料", httpMethod = "GET", notes = "接口发布说明")
public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) { public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) {
QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper) QyzxInvoiceUsual one = qyzxInvoiceUsualMapper.selectOne(new QueryWrapper<QyzxInvoiceUsual>().lambda()
.eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one(); .eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()));
if (one != null) {
if (one.getShippingArea() == null) {
one.setShippingArea("");
}
if (one.getShippingAddress() == null) {
one.setShippingAddress("");
}
}
return ResultUtil.data(one, "显示常用的企业开票资料"); return ResultUtil.data(one, "显示常用的企业开票资料");
} }
......
...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -29,7 +30,6 @@ import cn.hutool.core.lang.Console; ...@@ -29,7 +30,6 @@ import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.aspect.lang.annotation.BindingResultCtrol;
import cn.timer.api.bean.spmk.SpmkApprovalG; import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate; import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
import cn.timer.api.bean.spmk.SpmkApprovalTemplateG; import cn.timer.api.bean.spmk.SpmkApprovalTemplateG;
...@@ -43,6 +43,8 @@ import cn.timer.api.bean.spmk.SpmkInitiatorConfig; ...@@ -43,6 +43,8 @@ import cn.timer.api.bean.spmk.SpmkInitiatorConfig;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dao.spmk.SpmkApprovalGMapper; import cn.timer.api.dao.spmk.SpmkApprovalGMapper;
import cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper; import cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper;
import cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper; import cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper;
...@@ -52,7 +54,6 @@ import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper; ...@@ -52,7 +54,6 @@ import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper;
import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper; import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper;
import cn.timer.api.dao.spmk.SpmkExecutorMapper; import cn.timer.api.dao.spmk.SpmkExecutorMapper;
import cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper; import cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dto.spmk.ApprovingDto; import cn.timer.api.dto.spmk.ApprovingDto;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
...@@ -66,15 +67,20 @@ import cn.timer.api.dto.spmk.SummaryQueryDto; ...@@ -66,15 +67,20 @@ import cn.timer.api.dto.spmk.SummaryQueryDto;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import cn.timer.api.utils.router.RouterUtils; import cn.timer.api.utils.router.RouterUtils;
import cn.timer.api.utils.router.business.SpmkAssoBusiness;
import cn.timer.api.utils.router.business.SpmkAssoBusinessFactory;
import cn.timer.api.utils.router.enums.ApproveEnum;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
@Api(tags = "3.0审批模块") @Api(tags = "3.0审批模块")
@RestController @RestController
@Transactional @Transactional
@RequestMapping(value = "/spmk", @RequestMapping(value = "/spmk",
produces = { "application/json","multipart/form-data" }) produces = { "application/json","multipart/form-data" })
public class SpmkServiceImpl { //@BindingResultCtrol(title = "发起审批")
public class SpmkController {
@Autowired @Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper; private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
...@@ -88,7 +94,12 @@ public class SpmkServiceImpl { ...@@ -88,7 +94,12 @@ public class SpmkServiceImpl {
@Autowired @Autowired
private SpmkCustomApprovalMapper spmkCustomApprovalMapper; private SpmkCustomApprovalMapper spmkCustomApprovalMapper;
//TODO 新增或编辑-审批模板组 @Autowired
private ZzglBmgwMService zzglBmgwMService;
//TODO 审批模板组
/** /**
* 新增或编辑-审批模板组 * 新增或编辑-审批模板组
*/ */
...@@ -146,7 +157,7 @@ public class SpmkServiceImpl { ...@@ -146,7 +157,7 @@ public class SpmkServiceImpl {
@PostMapping(value = "/save_approval_template") @PostMapping(value = "/save_approval_template")
@ApiOperation(value = "5.新增或编辑-审批模板", httpMethod = "POST", notes = "新增或编辑-审批模板") @ApiOperation(value = "5.新增或编辑-审批模板", httpMethod = "POST", notes = "新增或编辑-审批模板")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
public Result<Object> saveAt(@RequestBody SpmkApprovalTemplateDto spmkApprovalTemplateDto){ public Result<Object> saveAt(@Valid @RequestBody SpmkApprovalTemplateDto spmkApprovalTemplateDto,BindingResult bindingResult){
Integer approvalTemplateGId = spmkApprovalTemplateDto.getApprovalTemplateGId(); Integer approvalTemplateGId = spmkApprovalTemplateDto.getApprovalTemplateGId();
if (ObjectUtil.isNull(approvalTemplateGId)) if (ObjectUtil.isNull(approvalTemplateGId))
return ResultUtil.error("操作失败!-1"); return ResultUtil.error("操作失败!-1");
...@@ -156,7 +167,7 @@ public class SpmkServiceImpl { ...@@ -156,7 +167,7 @@ public class SpmkServiceImpl {
// 克隆 SpmkApprovalTemplateDto对象 到 SpmkApprovalTemplate对象,排除属性froms,router // 克隆 SpmkApprovalTemplateDto对象 到 SpmkApprovalTemplate对象,排除属性froms,router
BeanUtil.copyProperties(spmkApprovalTemplateDto, at , "froms","router"); BeanUtil.copyProperties(spmkApprovalTemplateDto, at , "froms","router");
// 序列化 后 写入 SpmkApprovalTemplate对象 // 序列化 后 写入 SpmkApprovalTemplate对象
at.setFroms(ObjectUtil.serialize(spmkApprovalTemplateDto.getFroms())); at.setFroms(ObjectUtil.serialize((List<JSONObject>)spmkApprovalTemplateDto.getFroms()));
at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter())); at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter()));
if (!at.insertOrUpdate()) if (!at.insertOrUpdate())
...@@ -184,12 +195,17 @@ public class SpmkServiceImpl { ...@@ -184,12 +195,17 @@ public class SpmkServiceImpl {
/** /**
* id查询-审批模板 * id查询-审批模板
*/ */
@GetMapping(value = "/select_approval_template") @GetMapping(value = "/select_approval_template/{id}")
@ApiOperation(value = "7.id查询-审批模板", httpMethod = "GET", notes = "id查询-审批模板") @ApiOperation(value = "7.id查询-审批模板", httpMethod = "GET", notes = "id查询-审批模板")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public Result<Object> selectAtById(@PathVariable int id){ public Result<Object> selectAtById(@PathVariable int id){
SpmkApprovalTemplate at = SpmkApprovalTemplate.builder().id(id).build().selectById();
return ResultUtil.data(SpmkApprovalTemplate.builder().id(id).build().selectById(),"操作成功!");
SpmkApprovalTemplateDto atd = SpmkApprovalTemplateDto.builder().build();
BeanUtil.copyProperties(at, atd,"froms","router");
atd.setFroms(ObjectUtil.deserialize(at.getFroms()));
atd.setRouter(ObjectUtil.deserialize(at.getRouter()));
return ResultUtil.data(atd,"操作成功!");
} }
...@@ -197,7 +213,7 @@ public class SpmkServiceImpl { ...@@ -197,7 +213,7 @@ public class SpmkServiceImpl {
* 排序-审批模板 * 排序-审批模板
*/ */
@PutMapping(value = "/update_approval_template") @PutMapping(value = "/update_approval_template")
@ApiOperation(value = "8.查询列表-审批模板组", httpMethod = "PUT", notes = "查询列表-审批模板组") @ApiOperation(value = "8.排序-审批模板", httpMethod = "PUT", notes = "查询列表-审批模板组")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
public Result<Object> ranksAt(@RequestBody List<SpmkApprovalTemplate> list){ public Result<Object> ranksAt(@RequestBody List<SpmkApprovalTemplate> list){
...@@ -214,7 +230,7 @@ public class SpmkServiceImpl { ...@@ -214,7 +230,7 @@ public class SpmkServiceImpl {
@PostMapping(value = "/save_approval_g") @PostMapping(value = "/save_approval_g")
@ApiOperation(value = "9.新增或编辑-审批组", httpMethod = "POST", notes = "新增或编辑-审批组") @ApiOperation(value = "9.新增或编辑-审批组", httpMethod = "POST", notes = "新增或编辑-审批组")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public Result<Object> saveAg(@CurrentUser UserBean userBean,@RequestBody SpmkApprovalG spmkApprovalG){ public Result<Object> saveAg(@CurrentUser UserBean userBean, @RequestBody SpmkApprovalG spmkApprovalG){
spmkApprovalG.setOrgCode(userBean.getOrgCode()); spmkApprovalG.setOrgCode(userBean.getOrgCode());
return spmkApprovalG.insertOrUpdate() ? ResultUtil.data(spmkApprovalG, "操作成功!") : ResultUtil.error("操作失败!"); return spmkApprovalG.insertOrUpdate() ? ResultUtil.data(spmkApprovalG, "操作成功!") : ResultUtil.error("操作失败!");
...@@ -236,15 +252,31 @@ public class SpmkServiceImpl { ...@@ -236,15 +252,31 @@ public class SpmkServiceImpl {
} }
/** /**
* 查询列表-审批组 * 查询列表-审批组-审批管理
*/
@GetMapping(value = "/all_approval_g")
@ApiOperation(value = "11.查询列表-审批组-审批管理", httpMethod = "GET", notes = "查询列表-审批组-审批管理")
@ApiOperationSupport(order = 11)
public Result<Object> selectListAgByAdmin(@CurrentUser UserBean userBean){
List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
System.out.println(depts);
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCaByAdmin(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!");
}
/**
* 查询列表-审批组-个人审批
*/ */
@GetMapping(value = "/list_approval_g") @GetMapping(value = "/list_approval_g")
@ApiOperation(value = "11.查询列表-审批组", httpMethod = "GET", notes = "查询列表-审批组") @ApiOperation(value = "11.查询列表-审批组-个人审批", httpMethod = "GET", notes = "查询列表-审批组-个人审批")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
public Result<Object> selectListAg(@CurrentUser UserBean userBean){ public Result<Object> selectListAg(@CurrentUser UserBean userBean){
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum()),"操作成功!"); List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
System.out.println(depts);
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!");
} }
/** /**
...@@ -266,7 +298,7 @@ public class SpmkServiceImpl { ...@@ -266,7 +298,7 @@ public class SpmkServiceImpl {
@ApiOperation(value = "13.新增或编辑-自定义审批", httpMethod = "POST", notes = "新增或编辑-自定义审批") @ApiOperation(value = "13.新增或编辑-自定义审批", httpMethod = "POST", notes = "新增或编辑-自定义审批")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result<Object> saveCa(@RequestBody SpmkCustomApprovalDto spmkCustomApprovalDto) throws Exception{ public Result<Object> saveCa(@Valid @RequestBody SpmkCustomApprovalDto spmkCustomApprovalDto,BindingResult bindingResult) throws Exception{
Integer approvalGId = spmkCustomApprovalDto.getApprovalGId(); Integer approvalGId = spmkCustomApprovalDto.getApprovalGId();
if (ObjectUtil.isNull(approvalGId)) if (ObjectUtil.isNull(approvalGId))
return ResultUtil.error("操作失败!-1"); return ResultUtil.error("操作失败!-1");
...@@ -277,10 +309,14 @@ public class SpmkServiceImpl { ...@@ -277,10 +309,14 @@ public class SpmkServiceImpl {
ca.setFroms(ObjectUtil.serialize(spmkCustomApprovalDto.getFroms())); ca.setFroms(ObjectUtil.serialize(spmkCustomApprovalDto.getFroms()));
ca.setRouter(ObjectUtil.serialize(spmkCustomApprovalDto.getRouter())); ca.setRouter(ObjectUtil.serialize(spmkCustomApprovalDto.getRouter()));
//1.新增 SpmkCustomApproval-自定义审批
if (!ca.insertOrUpdate()) if (!ca.insertOrUpdate())
return ResultUtil.error("操作失败!-2"); return ResultUtil.error("操作失败!-2");
Integer id = ca.getId(); Integer id = ca.getId();
// 2.删除 历史的 SpmkInitiatorConfig-审批发起人配置,
SpmkInitiatorConfig.builder().build().delete(new QueryWrapper<SpmkInitiatorConfig>().lambda().eq(SpmkInitiatorConfig::getCustomApprovalId, id));
Console.log("自定义审批id: " + id); Console.log("自定义审批id: " + id);
List<SpmkInitiatorConfig> listIc = spmkCustomApprovalDto.getInitiatorConfigs(); List<SpmkInitiatorConfig> listIc = spmkCustomApprovalDto.getInitiatorConfigs();
...@@ -288,6 +324,7 @@ public class SpmkServiceImpl { ...@@ -288,6 +324,7 @@ public class SpmkServiceImpl {
for (int i = 0, n = listIc.size(); i < n; i++) { for (int i = 0, n = listIc.size(); i < n; i++) {
listIc.get(i).setCustomApprovalId(id); listIc.get(i).setCustomApprovalId(id);
} }
// 3.新增 最新的 SpmkInitiatorConfig-审批发起人配置,
if (!spmkInitiatorConfigMapper.insertList(listIc)) { if (!spmkInitiatorConfigMapper.insertList(listIc)) {
// 手动抛出异常,事务回滚 // 手动抛出异常,事务回滚
throw new Exception(); throw new Exception();
...@@ -295,14 +332,14 @@ public class SpmkServiceImpl { ...@@ -295,14 +332,14 @@ public class SpmkServiceImpl {
} }
SpmkInitiatorConfig.builder().build().delete(new QueryWrapper<SpmkInitiatorConfig>().lambda().eq(SpmkInitiatorConfig::getCustomApprovalId, id));
// //
/** /**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class)) * 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
* 1.删除 历史的 SpmkInitiatorConfig-审批发起人配置, * 1.新增 SpmkCustomApproval-自定义审批
* 2.新增 最新的 SpmkInitiatorConfig-审批发起人配置, * 2.删除 历史的 SpmkInitiatorConfig-审批发起人配置,
* 3.新增 SpmkCustomApproval-自定义审批 * 3.新增 最新的 SpmkInitiatorConfig-审批发起人配置,
*/ */
// 清空前端不需要的字段再返回,节省流量 // 清空前端不需要的字段再返回,节省流量
...@@ -339,12 +376,13 @@ public class SpmkServiceImpl { ...@@ -339,12 +376,13 @@ public class SpmkServiceImpl {
@ApiOperationSupport(order = 15) @ApiOperationSupport(order = 15)
public Result<Object> selectCaById(@PathVariable int id){ public Result<Object> selectCaById(@PathVariable int id){
SpmkCustomApproval ca = SpmkCustomApproval.builder().id(id).build().selectById(); SpmkCustomApproval ca = SpmkCustomApproval.builder().id(id).build().selectById();
List<SpmkInitiatorConfig> listIc = SpmkInitiatorConfig.builder().build().selectList(new QueryWrapper<SpmkInitiatorConfig>().lambda().eq(SpmkInitiatorConfig::getCustomApprovalId, id));
SpmkCustomApprovalDto caD = SpmkCustomApprovalDto.builder() SpmkCustomApprovalDto caD = SpmkCustomApprovalDto.builder()
.froms(ObjectUtil.unserialize(ca.getFroms())) .froms(ObjectUtil.deserialize(ca.getFroms()))
.router(ObjectUtil.unserialize(ca.getRouter())) .router(ObjectUtil.deserialize(ca.getRouter()))
.build(); .build();
BeanUtil.copyProperties(ca, caD,"froms","router"); BeanUtil.copyProperties(ca, caD,"froms","router");
caD.setInitiatorConfigs(listIc);
return ResultUtil.data(caD,"操作成功!"); return ResultUtil.data(caD,"操作成功!");
} }
...@@ -380,9 +418,8 @@ public class SpmkServiceImpl { ...@@ -380,9 +418,8 @@ public class SpmkServiceImpl {
@ApiOperation(value = "17.发起审批", httpMethod = "POST", notes = "发起审批") @ApiOperation(value = "17.发起审批", httpMethod = "POST", notes = "发起审批")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 17)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@BindingResultCtrol(title = "发起审批") // @BindingResultCtrol(title = "发起审批")
public Result<Object> saveCa(@CurrentUser UserBean userBean,@Valid @RequestBody SpmkApproveSummaryDto spmkApproveSummaryDto,BindingResult bindingResult) throws Exception{ public Result<Object> saveCa(@CurrentUser UserBean userBean,@Valid @RequestBody SpmkApproveSummaryDto spmkApproveSummaryDto,BindingResult bindingResult) throws Exception{
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>() YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>()
.lambda() .lambda()
.select(YgglMainEmp::getHeadUrl,YgglMainEmp::getName) .select(YgglMainEmp::getHeadUrl,YgglMainEmp::getName)
...@@ -394,10 +431,10 @@ public class SpmkServiceImpl { ...@@ -394,10 +431,10 @@ public class SpmkServiceImpl {
List<Router> listRouter = new ArrayList<Router>(); List<Router> listRouter = new ArrayList<Router>();
listRouter.add(spmkApproveSummaryDto.getRouter()); listRouter.add(spmkApproveSummaryDto.getRouter());
JSONObject jSONObject = spmkApproveSummaryDto.getRequestData() JSONObject jSONObject = spmkApproveSummaryDto.getRequestData()
.put("orgCode", FromData.builder().value(String.valueOf(userBean.getOrgCode())).build()) .set("orgCode", FromData.builder().value(String.valueOf(userBean.getOrgCode())).build())
.put("initiator", FromData.builder().value(spmkApproveSummaryDto.getInitiator()).build()) .set("initiator", FromData.builder().value(spmkApproveSummaryDto.getInitiator()).build())
.put("headUrl", FromData.builder().value(ygglMainEmp.getHeadUrl()).build()) .set("headUrl", FromData.builder().value(ygglMainEmp.getHeadUrl()).build())
.put("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build()); .set("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build());
RouterUtils.NextNode(listRouter, jSONObject, ISFIRST); RouterUtils.NextNode(listRouter, jSONObject, ISFIRST);
List<FlowChildren> listFlowChildren = new ArrayList<FlowChildren>(); List<FlowChildren> listFlowChildren = new ArrayList<FlowChildren>();
RouterUtils.getIsFlowChildren(listRouter,listFlowChildren); RouterUtils.getIsFlowChildren(listRouter,listFlowChildren);
...@@ -462,7 +499,7 @@ public class SpmkServiceImpl { ...@@ -462,7 +499,7 @@ public class SpmkServiceImpl {
empNums.add(ygglMainEmp.getEmpNum()); empNums.add(ygglMainEmp.getEmpNum());
} }
summaryQueryDto.setEmpNums(empNums); summaryQueryDto.setEmpNums(empNums);
// 缺-部门id 搜索 // 缺-部门id 搜索
IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQuery(page, summaryQueryDto); IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQuery(page, summaryQueryDto);
...@@ -482,13 +519,15 @@ public class SpmkServiceImpl { ...@@ -482,13 +519,15 @@ public class SpmkServiceImpl {
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, id)); SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, id));
SpmkApproveDetailDto adD = SpmkApproveDetailDto.builder().build(); SpmkApproveDetailDto adD = SpmkApproveDetailDto.builder().build();
if (ad == null) {
return ResultUtil.data(adD, "操作成功!");
}
List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(id); List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(id);
BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord"); BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord");
adD.setRequestData(ObjectUtil.deserialize(ad.getRequestData()));
adD.setRequestData(ObjectUtil.unserialize(ad.getRequestData())); adD.setFroms(ObjectUtil.deserialize(ad.getFroms()));
adD.setFroms(ObjectUtil.unserialize(ad.getFroms())); adD.setRouter(ObjectUtil.deserialize(ad.getRouter()));
adD.setRouter(ObjectUtil.unserialize(ad.getRouter())); adD.setFlowChildren(ObjectUtil.deserialize(ad.getFlowChildren()));
adD.setFlowChildren(ObjectUtil.unserialize(ad.getFlowChildren()));
adD.setApproveExecuteRecord(listAer); adD.setApproveExecuteRecord(listAer);
return ResultUtil.data(adD, "操作成功!"); return ResultUtil.data(adD, "操作成功!");
...@@ -521,6 +560,9 @@ public class SpmkServiceImpl { ...@@ -521,6 +560,9 @@ public class SpmkServiceImpl {
SpmkApproveDetail ad = SpmkApproveDetail.builder().build() SpmkApproveDetail ad = SpmkApproveDetail.builder().build()
.selectOne(new QueryWrapper<SpmkApproveDetail>() .selectOne(new QueryWrapper<SpmkApproveDetail>()
.lambda() .lambda()
.select(SpmkApproveDetail::getId,
SpmkApproveDetail::getRequestData,
SpmkApproveDetail::getFlowChildren)
.eq(SpmkApproveDetail::getApproveSummaryId, approvingDto.getAsId())); .eq(SpmkApproveDetail::getApproveSummaryId, approvingDto.getAsId()));
// 查询 SpmkApproveSummary 状态 // 查询 SpmkApproveSummary 状态
...@@ -542,7 +584,7 @@ public class SpmkServiceImpl { ...@@ -542,7 +584,7 @@ public class SpmkServiceImpl {
} }
if (aSummary.getSts() == 0) { if (aSummary.getSts() == 0) {
List<FlowChildren> listFlowChildren = ObjectUtil.unserialize(ad.getFlowChildren()); List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren());
RouterUtils.approving( RouterUtils.approving(
listFlowChildren, listFlowChildren,
approvingDto.getAsId(), approvingDto.getAsId(),
...@@ -560,10 +602,18 @@ public class SpmkServiceImpl { ...@@ -560,10 +602,18 @@ public class SpmkServiceImpl {
if (fc.getExecute() == "2") { if (fc.getExecute() == "2") {
// 查询 SpmkApproveSummary 状态 // 查询 SpmkApproveSummary 状态
aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda() aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts) .select(SpmkApproveSummary::getSts,SpmkApproveSummary::getAssoType)
.eq(SpmkApproveSummary::getId, approvingDto.getAsId())); .eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != 3) { if (aSummary.getSts() != 3) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).endTime(new Date()).sts(2).build().updateById(); SpmkApproveSummary.builder().id(approvingDto.getAsId()).endTime(new Date()).sts(2).build().updateById();
//审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null)
sab.handleApprove(ObjectUtil.deserialize(ad.getRequestData()));
} }
} }
...@@ -602,6 +652,8 @@ public class SpmkServiceImpl { ...@@ -602,6 +652,8 @@ public class SpmkServiceImpl {
@ApiOperationSupport(order = 90) @ApiOperationSupport(order = 90)
public Result<Object> deleteApprovalData(@CurrentUser UserBean userBean){ public Result<Object> deleteApprovalData(@CurrentUser UserBean userBean){
spmkApprovalGMapper.delete(null);
spmkCustomApprovalMapper.delete(null);
spmkApproveSummaryMapper.delete(null); spmkApproveSummaryMapper.delete(null);
spmkApproveDetailMapper.delete(null); spmkApproveDetailMapper.delete(null);
spmkApproveExecuteRecordMapper.delete(null); spmkApproveExecuteRecordMapper.delete(null);
...@@ -621,5 +673,19 @@ public class SpmkServiceImpl { ...@@ -621,5 +673,19 @@ public class SpmkServiceImpl {
return ResultUtil.data(spmkIcons,"获取图标列表成功"); return ResultUtil.data(spmkIcons,"获取图标列表成功");
} }
@Autowired
SpmkServiceImpl SpmkService;
//TODO 测试-生成 审批组 和 自定义审批
@GetMapping(value = "/test")
@ApiOperation(value = "98.测试-生成 审批组 和 自定义审批", httpMethod = "GET", notes = "测试-生成 审批组 和 自定义审批")
@ApiOperationSupport(order = 98)
public Result<List<SpmkIcon>> createCustomApproval(@RequestParam Integer orgCode){
SpmkService.createCustomApproval(orgCode);
List<SpmkIcon> spmkIcons = SpmkIcon.builder().build().selectAll();
return ResultUtil.data(spmkIcons,"获取图标列表成功");
}
} }
package cn.timer.api.controller.spmk.service;
public interface SpmkService {
boolean createCustomApproval(Integer orgCode);
}
package cn.timer.api.controller.spmk.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console;
import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
import cn.timer.api.bean.spmk.SpmkApprovalTemplateG;
import cn.timer.api.bean.spmk.SpmkCustomApproval;
import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper;
@Service
public class SpmkServiceImpl implements SpmkService{
@Autowired
SpmkCustomApprovalMapper spmkCustomApprovalMapper;
/**
* 根据orgCode查数据库 审批模板 生成 自定义模板
* orgCode 企业id
*/
@Override
public boolean createCustomApproval(Integer orgCode) {
// TODO Auto-generated method stub
List<SpmkApprovalTemplateG> listAtg = SpmkApprovalTemplateG.builder().build()
.selectList(new QueryWrapper<SpmkApprovalTemplateG>().lambda().orderByAsc(SpmkApprovalTemplateG::getId));
List<SpmkApprovalG> listAG = new ArrayList<SpmkApprovalG>(listAtg.size());
for (SpmkApprovalTemplateG spmkApprovalTemplateG : listAtg) {
SpmkApprovalG saG = SpmkApprovalG.builder().build();
BeanUtil.copyProperties(spmkApprovalTemplateG, saG, "id","update_time");
saG.setOrgCode(orgCode);
listAG.add(saG);
}
Console.log(listAG);
SpmkCustomApproval sca = SpmkCustomApproval.builder().build();
List<SpmkApprovalTemplate> listAt = new ArrayList<SpmkApprovalTemplate>();
for (int i = 0,n = listAG.size(); i < n; i++) {
boolean b = listAG.get(i).insert();
if (b) {
listAt = SpmkApprovalTemplate.builder().build().selectList(new QueryWrapper<SpmkApprovalTemplate>()
.lambda()
.eq(SpmkApprovalTemplate::getApprovalTemplateGId, listAtg.get(i).getId()).orderByAsc(SpmkApprovalTemplate::getId));
for (SpmkApprovalTemplate spmkApprovalTemplate : listAt) {
BeanUtil.copyProperties(spmkApprovalTemplate, sca, "id","approval_template_g_id","update_time","create_time");
sca.setOrgCode(orgCode);
sca.setApprovalGId(listAG.get(i).getId());
sca.setIsAllvisible(1);
sca.insert();
}
}
}
return true;
}
}
...@@ -11,10 +11,12 @@ import java.util.ArrayList; ...@@ -11,10 +11,12 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -43,6 +45,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; ...@@ -43,6 +45,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.BetweenFormater.Level; import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
...@@ -76,6 +79,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper; ...@@ -76,6 +79,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.yggl.YgglMainLzbMapper; import cn.timer.api.dao.yggl.YgglMainLzbMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dto.yggl.AddygdaDto; import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.dto.yggl.LoginInfoDto;
import cn.timer.api.dto.yggl.LoginerChargeDto; import cn.timer.api.dto.yggl.LoginerChargeDto;
import cn.timer.api.dto.yggl.LzbQueryDto; import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto; import cn.timer.api.dto.yggl.LzygQueryDto;
...@@ -142,17 +146,34 @@ public class YgglController { ...@@ -142,17 +146,34 @@ public class YgglController {
@GetMapping(value = "/loginmessage") @GetMapping(value = "/loginmessage")
@ApiOperation(value = " 获取登录人的相关信息", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = " 获取登录人的相关信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 68) @ApiOperationSupport(order = 68)
public Result<YgglMainEmp> loginmessage(@CurrentUser UserBean userBean) { public Result<LoginInfoDto> loginmessage(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
LoginInfoDto loginInfo = LoginInfoDto.builder().build();
YgglMainEmp ygglMainEmp = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper) YgglMainEmp ygglMainEmp = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.select(YgglMainEmp::getBmgwId, YgglMainEmp::getName, YgglMainEmp::getRzTime, YgglMainEmp::getEmpNum) .select(YgglMainEmp::getBmgwId,
YgglMainEmp::getName,
YgglMainEmp::getRzTime,
YgglMainEmp::getZzTime,
YgglMainEmp::getEmpNum)
.eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, orgCode).one(); .eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, orgCode).one();
Integer gw = ygglMainEmp.getBmgwId(); if (ygglMainEmp != null) {
ZzglBmgwM bmid = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).select(ZzglBmgwM::getUpId) Integer gw = ygglMainEmp.getBmgwId();
.eq(ZzglBmgwM::getId, gw).eq(ZzglBmgwM::getOrgCode, orgCode).one(); ZzglBmgwM gwObj = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).select(ZzglBmgwM::getUpId,ZzglBmgwM::getName)
ygglMainEmp.setUnionid(bmid.toString()); .eq(ZzglBmgwM::getId, gw).eq(ZzglBmgwM::getOrgCode, orgCode).one();
return ResultUtil.data(ygglMainEmp, "部门id返回字段为unionid");
ZzglBmgwM bmObj = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).select(ZzglBmgwM::getId,ZzglBmgwM::getName)
.eq(ZzglBmgwM::getId, gwObj.getUpId()).eq(ZzglBmgwM::getOrgCode, orgCode).one();
loginInfo.setEmpNum(ygglMainEmp.getEmpNum());
loginInfo.setName(ygglMainEmp.getName());
loginInfo.setBmId(bmObj != null ? bmObj.getId() : null);
loginInfo.setBmName(bmObj != null ? bmObj.getName() : null);
loginInfo.setGwId(gw);
loginInfo.setGwName(gwObj != null ? gwObj.getName() : "");
loginInfo.setEntryTime(ygglMainEmp.getRzTime());
loginInfo.setRegularTime(ygglMainEmp.getRzTime());
}
return ResultUtil.data(loginInfo, "操作成功!");
} }
/** /**
...@@ -219,6 +240,7 @@ public class YgglController { ...@@ -219,6 +240,7 @@ public class YgglController {
return one; return one;
} }
/** /**
* 获取用户头像 * 获取用户头像
* *
...@@ -359,9 +381,13 @@ public class YgglController { ...@@ -359,9 +381,13 @@ public class YgglController {
.build(); .build();
ygglMainEmp.insert(); ygglMainEmp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
if(addygdaDto.getBmgwId() != null) {
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.set(addygdaDto.getBmgwId() != null, YgglMainEmp::getBmgwId, addygdaDto.getBmgwId()) .set(addygdaDto.getBmgwId() != null, YgglMainEmp::getBmgwId, addygdaDto.getBmgwId())
.eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getId, ygglMainEmp.getId()).update(); .eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getId, ygglMainEmp.getId()).update();
}
return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!"); return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
} else { } else {
...@@ -423,7 +449,8 @@ public class YgglController { ...@@ -423,7 +449,8 @@ public class YgglController {
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
ZzglBmgwM.getDepts(bList, b, zzglBmgwMs); ZzglBmgwM.getDepts(bList, b, zzglBmgwMs);
Integer j = ygQueryDto.getJobStatus(); Integer j = ygQueryDto.getJobStatus();
Integer t = ygQueryDto.getJobType(); Integer t = ygQueryDto.getJobType();
String q = ygQueryDto.getQuery(); String q = ygQueryDto.getQuery();
...@@ -438,6 +465,7 @@ public class YgglController { ...@@ -438,6 +465,7 @@ public class YgglController {
.in(!bList.isEmpty(), "bmgw_id", bList) .in(!bList.isEmpty(), "bmgw_id", bList)
.and(!StrUtil.hasBlank(q), wq -> wq.like("name", q).or().like("phone", q)); .and(!StrUtil.hasBlank(q), wq -> wq.like("name", q).or().like("phone", q));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper); // List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper); IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper);
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords(); // List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
...@@ -767,9 +795,10 @@ public class YgglController { ...@@ -767,9 +795,10 @@ public class YgglController {
// 浴池,洗去选填项字节大于100的选项 // 浴池,洗去选填项字节大于100的选项
public boolean takeshower(String[] bathroom) { public boolean takeshower(String[] bathroom) {
for (String b : bathroom) { for (String b : bathroom) {
if (b.length() > 100) { if (b!=null&& b.length() > 100) {
return false; return false;
} }
} }
return true; return true;
} }
......
package cn.timer.api.controller.zzgl; package cn.timer.api.controller.zzgl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
import javax.transaction.Transactional; import javax.transaction.Transactional;
...@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.core.collection.ListUtil;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth; import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper; import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper;
import cn.timer.api.dto.zzgl.LogDgjlsDto; import cn.timer.api.dto.zzgl.LogDgjlsDto;
...@@ -48,6 +51,9 @@ public class ZzglController { ...@@ -48,6 +51,9 @@ public class ZzglController {
@Autowired @Autowired
ZzglLogDgjlMapper zzglLogDgjlMapper; ZzglLogDgjlMapper zzglLogDgjlMapper;
@Autowired
YgglMainEmpMapper ygglMainEmpMapper;
/** /**
* 架构树/架构图/导出 * 架构树/架构图/导出
...@@ -63,6 +69,15 @@ public class ZzglController { ...@@ -63,6 +69,15 @@ public class ZzglController {
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
return ResultUtil.data(zzglBmgwMs); return ResultUtil.data(zzglBmgwMs);
} }
@GetMapping(value = "/depts")
@ApiOperation(value = "只获取部门", httpMethod = "GET", notes = "接口发布说明")
public Result<List<ZzglBmgwM>> selectdepts(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list();//0:部门;1:岗位
return ResultUtil.data(zzglBmgwMs);
}
/** /**
* 岗位成员 * 岗位成员
...@@ -161,6 +176,8 @@ public class ZzglController { ...@@ -161,6 +176,8 @@ public class ZzglController {
@PostMapping(value = "/dept") @PostMapping(value = "/dept")
@ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明")
public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM) { public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM) {
if (zzglBmgwM.getName().trim().length()==0)
return ResultUtil.error("部门岗位名称不能为空");
Boolean a = zzglBmgwM.getId() == null; Boolean a = zzglBmgwM.getId() == null;
if (a && zzglBmgwM.getType() == null) if (a && zzglBmgwM.getType() == null)
zzglBmgwM.setType((Integer) 0); zzglBmgwM.setType((Integer) 0);
...@@ -170,7 +187,8 @@ public class ZzglController { ...@@ -170,7 +187,8 @@ public class ZzglController {
return ResultUtil.data(zzglBmgwM); return ResultUtil.data(zzglBmgwM);
return ResultUtil.success(); return ResultUtil.success();
} }
/** /**
* 删除部门岗位 * 删除部门岗位
* *
......
package cn.timer.api.controller.zzgl.service;
import java.util.List;
/**
* 部门岗位 服务层
*
* @author Tang
*/
public interface ZzglBmgwMService {
public List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum);
}
package cn.timer.api.controller.zzgl.service;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import cn.hutool.core.collection.ListUtil;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
/**
* 部门岗位 服务逻辑层
*
* @author Tang
*/
@Service
public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
@Autowired
private ZzglBmgwMMapper zzglBmgwMMapper;
@Autowired
private YgglMainEmpMapper ygglMainEmpMapper;
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
@Override
public List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum) {
Set<Integer> lanzi = new HashSet<Integer>();
//所有部门岗位
List<ZzglBmgwM> bmgws = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getOrgCode, orgCode).list();
//个人岗位
YgglMainEmp one = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.select(YgglMainEmp::getBmgwId)
.eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, empNum).one();
Integer getId = one != null ? one.getBmgwId() : null;
System.out.println(getId);
Set<Integer> all = one != null ? empNumupdept2(lanzi, bmgws, getId) : new HashSet<Integer>();
all.add(getId);
return ListUtil.toList(all);
}
//遍历
public Set<Integer> empNumupdept2(Set<Integer> lanzi,List<ZzglBmgwM> bmgws,Integer getId) {
for (ZzglBmgwM z : bmgws) {
if (getId.equals(z.getId())) {
lanzi.add(getId);
if (z.getUpId()==null || z.getUpId() == 0) {
return lanzi;
}
getId = z.getUpId();
empNumupdept2(lanzi, bmgws, getId);
}
}
return lanzi;
}
}
...@@ -17,8 +17,10 @@ import cn.timer.api.bean.spmk.SpmkApprovalG; ...@@ -17,8 +17,10 @@ import cn.timer.api.bean.spmk.SpmkApprovalG;
@Repository @Repository
public interface SpmkApprovalGMapper extends BaseMapper<SpmkApprovalG> { public interface SpmkApprovalGMapper extends BaseMapper<SpmkApprovalG> {
List<SpmkApprovalG> selectListAgInCa(@Param("org_code") Integer org_code, @Param("emp_num") Integer emp_num); List<SpmkApprovalG> selectListAgInCa(@Param("org_code") Integer org_code, @Param("emp_num") Integer emp_num, @Param("deptIds") List<Integer> deptIds);
boolean updateListRandsById(List<SpmkApprovalG> list); boolean updateListRandsById(List<SpmkApprovalG> list);
List<SpmkApprovalG> selectListAgInCaByAdmin(@Param("org_code") Integer org_code, @Param("emp_num") Integer emp_num, @Param("deptIds") List<Integer> deptIds);
} }
package cn.timer.api.dto.kqgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CompensateDto {
@ApiModelProperty(value = "加班补偿记录id", example = "1", required = true)
private Integer id;
@ApiModelProperty(value = "加班补偿名称", example = "加班费、调休")
private String value;
}
package cn.timer.api.dto.kqgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LeaveTypeDto {
@ApiModelProperty(value = "假期记录id", example = "1", required = true)
private Integer id;
@ApiModelProperty(value = "假期名称", example = "事假、调休...")
private String value;
}
...@@ -35,8 +35,8 @@ public class MySummaryQueryDto extends Page{ ...@@ -35,8 +35,8 @@ public class MySummaryQueryDto extends Page{
private String endTime; private String endTime;
@NotNull(message = "type为空") @NotNull(message = "type为空")
@DecimalMax(value = "2",message = "assoType 只能为 0我发起的 1抄送我的 2我审批的") @DecimalMax(value = "2",message = "type 只能为 0我发起的 1抄送我的 2我审批的")
@DecimalMin(value = "0",message = "assoType 只能为 0我发起的 1抄送我的 2我审批的") @DecimalMin(value = "0",message = "type 只能为 0我发起的 1抄送我的 2我审批的")
@ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的", example = "0") @ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的", example = "0")
private Integer type; private Integer type;
......
package cn.timer.api.dto.spmk; package cn.timer.api.dto.spmk;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -20,12 +26,15 @@ public class SpmkApprovalTemplateDto { ...@@ -20,12 +26,15 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty(value = "编号 编号", example = "101") @ApiModelProperty(value = "编号 编号", example = "101")
private Integer id; private Integer id;
@NotNull(message = "approvalTemplateGId为空")
@ApiModelProperty(value = "审批模板组id 当前用户ID", example = "101") @ApiModelProperty(value = "审批模板组id 当前用户ID", example = "101")
private Integer approvalTemplateGId; private Integer approvalTemplateGId;
@NotBlank(message = "iconUrl为空")
@ApiModelProperty(value = "审批图标地址 ", example = "审批图标地址") @ApiModelProperty(value = "审批图标地址 ", example = "审批图标地址")
private String iconUrl; private String iconUrl;
@NotBlank(message = "name为空")
@ApiModelProperty(value = "审批名称 ", example = "审批名称") @ApiModelProperty(value = "审批名称 ", example = "审批名称")
private String name; private String name;
...@@ -38,6 +47,7 @@ public class SpmkApprovalTemplateDto { ...@@ -38,6 +47,7 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty(value = "排序 由于区分关键字,命名后缀加s", example = "101") @ApiModelProperty(value = "排序 由于区分关键字,命名后缀加s", example = "101")
private Integer ranks; private Integer ranks;
@NotBlank(message = "isOpinion为空 是否必填 意见 0是 1否")
@ApiModelProperty(value = "审批意见 是否必填 意见 0是 1否", example = "101") @ApiModelProperty(value = "审批意见 是否必填 意见 0是 1否", example = "101")
private Integer isOpinion; private Integer isOpinion;
...@@ -47,12 +57,17 @@ public class SpmkApprovalTemplateDto { ...@@ -47,12 +57,17 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "2") @NotNull(message = "assoType为空")
@DecimalMax(value = "9",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪", example = "1")
private Integer assoType; private Integer assoType;
@NotEmpty(message = "froms为空")
@ApiModelProperty(value = "审批表单 ", example = "审批表单") @ApiModelProperty(value = "审批表单 ", example = "审批表单")
private JSONObject froms; private List<JSONObject> froms;
@NotNull(message = "router为空")
@ApiModelProperty(value = "审批流程 ", example = "审批流程") @ApiModelProperty(value = "审批流程 ", example = "审批流程")
private Router router; private Router router;
......
...@@ -2,12 +2,10 @@ package cn.timer.api.dto.spmk; ...@@ -2,12 +2,10 @@ package cn.timer.api.dto.spmk;
import java.util.List; import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.DecimalMax; import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin; import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -38,9 +36,9 @@ public class SpmkApproveSummaryDto{ ...@@ -38,9 +36,9 @@ public class SpmkApproveSummaryDto{
private String initiator; private String initiator;
@NotNull(message = "assoType为空") @NotNull(message = "assoType为空")
@DecimalMax(value = "9",message = "assoType 只能为 0无 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡") @DecimalMax(value = "9",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = "assoType 只能为 0无 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡") @DecimalMin(value = "0",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡 ", example = "5") @ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡", example = "1")
private Integer assoType; private Integer assoType;
@NotNull(message = "requestData为空") @NotNull(message = "requestData为空")
......
...@@ -3,6 +3,12 @@ package cn.timer.api.dto.spmk; ...@@ -3,6 +3,12 @@ package cn.timer.api.dto.spmk;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.bean.spmk.SpmkInitiatorConfig; import cn.timer.api.bean.spmk.SpmkInitiatorConfig;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -23,12 +29,15 @@ public class SpmkCustomApprovalDto { ...@@ -23,12 +29,15 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101") @ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode; private Integer orgCode;
@NotNull(message = "approvalGId为空")
@ApiModelProperty(value = "审批组id 当前用户ID", example = "101") @ApiModelProperty(value = "审批组id 当前用户ID", example = "101")
private Integer approvalGId; private Integer approvalGId;
@NotBlank(message = "iconUrl为空")
@ApiModelProperty(value = "审批图标地址 ", example = "审批图标地址") @ApiModelProperty(value = "审批图标地址 ", example = "审批图标地址")
private String iconUrl; private String iconUrl;
@NotBlank(message = "name为空")
@ApiModelProperty(value = "审批名称 ", example = "审批名称") @ApiModelProperty(value = "审批名称 ", example = "审批名称")
private String name; private String name;
...@@ -50,15 +59,27 @@ public class SpmkCustomApprovalDto { ...@@ -50,15 +59,27 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "1") @NotNull(message = "assoType为空")
@DecimalMax(value = "9",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡", example = "1")
private Integer assoType; private Integer assoType;
@NotNull(message = "isAllvisible为空")
@DecimalMax(value = "1",message = "isAllvisible 只能为 0部分可见 1所有可见 2禁用")
@DecimalMin(value = "0",message = "isAllvisible 只能为 0部分可见 1所有可见 2禁用")
@ApiModelProperty(value = "可见范围 0部分可见 1所有可见 2禁用", example = "1")
private Integer isAllvisible;
@NotEmpty(message = "froms为空")
@ApiModelProperty(value = "审批表单 ", example = "审批表单") @ApiModelProperty(value = "审批表单 ", example = "审批表单")
private List<JSONObject> froms; private List<JSONObject> froms;
@NotNull(message = "router为空")
@ApiModelProperty(value = "审批流程 ", example = "审批流程") @ApiModelProperty(value = "审批流程 ", example = "审批流程")
private Router router; private Router router;
@NotNull(message = "initiatorConfigs为空")
@ApiModelProperty(value = "可见发起人配置 ", example = "数组类型") @ApiModelProperty(value = "可见发起人配置 ", example = "数组类型")
private List<SpmkInitiatorConfig> initiatorConfigs; private List<SpmkInitiatorConfig> initiatorConfigs;
......
package cn.timer.api.dto.yggl;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LoginInfoDto {
@ApiModelProperty(value = "员工id", example = "1")
private Integer empNum;
@ApiModelProperty(value = "员工姓名", example = "1")
private String name;
@ApiModelProperty(value = "部门id", example = "1")
private Integer bmId;
@ApiModelProperty(value = "部门名称", example = "1")
private String bmName;
@ApiModelProperty(value = "岗位id", example = "1")
private Integer gwId;
@ApiModelProperty(value = "岗位名称", example = "1")
private String gwName;
@ApiModelProperty(value = "入职日期", example = "1")
private Date entryTime;
@ApiModelProperty(value = "转正时间", example = "1")
private Date regularTime;
}
...@@ -100,7 +100,7 @@ public class RouterUtils { ...@@ -100,7 +100,7 @@ public class RouterUtils {
listUser.get(i).setExecute(EXECUTING); listUser.get(i).setExecute(EXECUTING);
// 首次发起申请时,写入 审批人名称 至 obj 中 // 首次发起申请时,写入 审批人名称 至 obj 中
if (isFirse) { if (isFirse) {
obj.put("current_approver", listUser.get(i).getName()); obj.set("current_approver", listUser.get(i).getName());
} }
break user; break user;
...@@ -121,8 +121,11 @@ public class RouterUtils { ...@@ -121,8 +121,11 @@ public class RouterUtils {
List<Relation> listRelations = router.getRelation(); List<Relation> listRelations = router.getRelation();
for (int i = 0; i < listRelations.size(); i++) { for (int i = 0; i < listRelations.size(); i++) {
// 装配 部门人员 // 装配 部门人员
if (RELATION_TYPE_DEPARTMENT.equals(listRelations.get(i).getType())) { if (RELATION_TYPE_DEPARTMENT.equals(listRelations.get(i).getType()) && listRelations.get(i).getDepartmentId() != null) {
List<YgglMainEmp> listYgglMainEmp = selectOtherlistent(Integer.parseInt(obj.get("orgCode",FromData.class).getValue()), Integer.valueOf(listRelations.get(i).getDepartmentId()));
Console.log("listRelations-----------"+ listRelations);
Console.log("obj-----------"+ obj);
List<YgglMainEmp> listYgglMainEmp = selectOtherlistent(Integer.parseInt(obj.get("orgCode",FromData.class).getValue().trim()), Integer.valueOf(listRelations.get(i).getDepartmentId().trim()));
System.out.println(listYgglMainEmp); System.out.println(listYgglMainEmp);
...@@ -196,8 +199,8 @@ public class RouterUtils { ...@@ -196,8 +199,8 @@ public class RouterUtils {
if (listCondition == null || listCondition.size() == 0) { if (listCondition == null || listCondition.size() == 0) {
routerRule.setFlow(true); routerRule.setFlow(true);
}else { }else {
Compare compare;
for (Condition condition : listCondition) { for (Condition condition : listCondition) {
Compare compare ;
for (String string : condition.getValues()) { for (String string : condition.getValues()) {
// 简单工厂模式 - 判断条件 // 简单工厂模式 - 判断条件
...@@ -547,7 +550,6 @@ public class RouterUtils { ...@@ -547,7 +550,6 @@ public class RouterUtils {
aer2.insert(); aer2.insert();
for (int i_user2 = 0,n_user2 = listUser.size(); i_user2 < n_user2; i_user2++) { for (int i_user2 = 0,n_user2 = listUser.size(); i_user2 < n_user2; i_user2++) {
User u = listUser.get(i_user2);
SpmkExecutor executor = SpmkExecutor.builder() SpmkExecutor executor = SpmkExecutor.builder()
.approveExecuteRecordId(aer2.getId()) .approveExecuteRecordId(aer2.getId())
.empNum(Integer.parseInt(listUser.get(i_user2).getId())) .empNum(Integer.parseInt(listUser.get(i_user2).getId()))
......
package cn.timer.api.utils.router.business;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 出差-业务
* @author Tang
*
*/
@Builder
public class EvectionBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String longTime = jsonObj.get("__longTime",FromData.class).getValue();
// 出差事由
String businessTrip = jsonObj.get("__businessTrip",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 请假-业务
*
* @author Tang
*
*/
@Builder
public class LeaveBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 请假类型
String LeaveType = jsonObj.get("__LeaveType",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String longTime = jsonObj.get("__longTime",FromData.class).getValue();
// 请假事由
String ReasonsForLeave = jsonObj.get("__ReasonsForLeave",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 招聘-业务
*
* @author Tang
*
*/
@Builder
public class RecruitBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 招聘部门
String RecruitmentDept = jsonObj.get("__RecruitmentDept",FromData.class).getValue();
// 招聘职位
String RecruitmentPost = jsonObj.get("__RecruitmentPost",FromData.class).getValue();
// 工性性质
String WorkingNature = jsonObj.get("__WorkingNature",FromData.class).getValue();
// 招聘人数
String NumberOfRecruiters = jsonObj.get("__NumberOfRecruiters",FromData.class).getValue();
// 已在岗人数
String NumberOfPeople = jsonObj.get("NumberOfPeople",FromData.class).getValue();
// 招聘原因
String RecruitmentReasons = jsonObj.get("RecruitmentReasons",FromData.class).getValue();
// 该岗位工作职责
String operatingDuty = jsonObj.get("operatingDuty",FromData.class).getValue();
// 招聘要求
String RecruitmentRequirements = jsonObj.get("RecruitmentRequirements",FromData.class).getValue();
// 薪酬上限
String SalaryCap = jsonObj.get("SalaryCap",FromData.class).getValue();
// 薪酬下限
String TransferInDepartment = jsonObj.get("TransferInDepartment",FromData.class).getValue();
// 生效日期
String PayFloor = jsonObj.get("PayFloor",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 招聘管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 转正-业务
* @author Tang
*
*/
@Builder
public class RegularizationBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 申请人名称
String applicant = jsonObj.get("__applicant",FromData.class).getValue();
// 试用期内主要工作和成绩
String WorkAndAchievement = jsonObj.get("WorkAndAchievement",FromData.class).getValue();
// 存在问题及改进意见
String problem = jsonObj.get("problem",FromData.class).getValue();
// 上传文件
String file = jsonObj.get("file",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 实际转正时间
String newConfirmationTime = jsonObj.get("__newConfirmationTime",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
// 调 员工管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 补卡-业务
* @author Tang
*
*/
@Builder
public class ReissueACardBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 补卡时间
String PatchCardTime = jsonObj.get("__PatchCardTime",FromData.class).getValue();
// 缺卡原因
String cardShortage = jsonObj.get("cardShortage",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 离职-业务
* @author Tang
*
*/
@Builder
public class ResignationBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 申请人
String applicant = jsonObj.get("__applicant",FromData.class).getValue();
// 计划离职日期
String terminationDate = jsonObj.get("__terminationDate",FromData.class).getValue();
// 离职原因
String ReasonForResignation = jsonObj.get("__ReasonForResignation",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 员工管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import lombok.Data;
/**
* 审批关联业务
* @author Tang
*
*/
@Data
public abstract class SpmkAssoBusiness {
public abstract void handleApprove(JSONObject jsonObj);
}
package cn.timer.api.utils.router.business;
import cn.timer.api.utils.router.enums.ApproveEnum;
/**
* 审批关联业务工厂类
* @author Tang
*
*/
public class SpmkAssoBusinessFactory {
public static SpmkAssoBusiness createSpmkAssoType(ApproveEnum assotype) {
SpmkAssoBusiness sat = null;
switch (assotype) {
case DEFAULT:
break;
case REGULARIZATION:
sat = RegularizationBusiness.builder().build();
break;
case RESIGNATION:
sat = ResignationBusiness.builder().build();
break;
case TRANSFER_POSITION:
sat = TransferPositionBusiness.builder().build();
break;
case RECRUIT:
sat = RecruitBusiness.builder().build();
break;
case WORK_OVERTIME:
sat = WorkOvertimeBusiness.builder().build();
break;
case LEAVE:
sat = LeaveBusiness.builder().build();
break;
case EVECTION:
sat = EvectionBusiness.builder().build();
break;
case REISSUE_A_CARD:
sat = ReissueACardBusiness.builder().build();
break;
default:
break;
}
return sat;
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 调岗-业务
* @author Tang
*
*/
@Builder
public class TransferPositionBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 申请人
String applicant = jsonObj.get("__applicant",FromData.class).getValue();
// 申请原因
String ReasonForApplication = jsonObj.get("__ReasonForApplication",FromData.class).getValue();
// 调入部门
String TransferInDepartment = jsonObj.get("__TransferInDepartment",FromData.class).getValue();
// 调入岗位
String TransferInPosition = jsonObj.get("__TransferInPosition",FromData.class).getValue();
// 生效日期
String effectiveDate = jsonObj.get("__effectiveDate",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 员工管理 业务
}
}
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
/**
* 加班-业务
* @author Tang
*
*/
@Builder
public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String timeLong = jsonObj.get("__timeLong",FromData.class).getValue();
// 加班补偿方式
String compensate = jsonObj.get("__compensate",FromData.class).getValue();
// 加班原因
String OvertimeReason = jsonObj.get("__OvertimeReason",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
}
package cn.timer.api.utils.router.enums;
public enum ApproveEnum {
DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1),
RECRUIT(4, "招聘", 1), WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), REISSUE_A_CARD(8, "补卡", 2),
WAGE_ADJUSTMENT(9, "调薪", 3),;
private Integer type;
private String desc;
private Integer businessType;
ApproveEnum(Integer type, String desc, Integer businessType) {
this.type = type;
this.desc = desc;
this.businessType = businessType;
}
public Integer getType() {
return this.type;
}
public static ApproveEnum getEnums(Integer type) {
for (ApproveEnum approveEnum : values()) {
if (approveEnum.getType() == type) {
return approveEnum;
}
}
return null;
}
public String getDesc() {
return this.desc;
}
public Integer getBusinessType() {
return this.businessType;
}
}
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
<delete id="delete"> <!-- <delete id="delete">
DELETE FROM jxgl_admin_jcsz DELETE FROM jxgl_admin_jcsz
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM jxgl_admin_jcsz FROM jxgl_admin_jcsz
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM jxgl_admin_kpzsz DELETE FROM jxgl_admin_kpzsz
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM jxgl_admin_kpzsz FROM jxgl_admin_kpzsz
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM jxgl_admin_zbk DELETE FROM jxgl_admin_zbk
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM jxgl_admin_zbk FROM jxgl_admin_zbk
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM sbgjj_admin_cbry DELETE FROM sbgjj_admin_cbry
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM sbgjj_admin_cbry FROM sbgjj_admin_cbry
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM sbgjj_asso_cbfa DELETE FROM sbgjj_asso_cbfa
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -173,6 +173,6 @@ ...@@ -173,6 +173,6 @@
SELECT count(1) SELECT count(1)
FROM sbgjj_asso_cbfa FROM sbgjj_asso_cbfa
</select> </select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</foreach> </foreach>
</insert> </insert>
<insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id"> <!-- <insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id">
INSERT INTO sbgjj_asso_cbfzmx INSERT INTO sbgjj_asso_cbfzmx
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != xz'> <if test ='null != xz'>
...@@ -288,6 +288,6 @@ ...@@ -288,6 +288,6 @@
SELECT count(1) SELECT count(1)
FROM sbgjj_asso_cbfzmx FROM sbgjj_asso_cbfzmx
</select> </select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM sbgjj_asso_yjzd DELETE FROM sbgjj_asso_yjzd
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM sbgjj_asso_yjzd FROM sbgjj_asso_yjzd
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</select> </select>
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjTypeDetails"> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjTypeDetails">
INSERT INTO sbgjj_type_details INSERT INTO sbgjj_type_details
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'> <if test ='null != name'>
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM sbgjj_type_details FROM sbgjj_type_details
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</sql> </sql>
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjYjCsbh"> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjYjCsbh">
INSERT INTO sbgjj_yj_csbh INSERT INTO sbgjj_yj_csbh
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != cityCode'> <if test ='null != cityCode'>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM sbgjj_yj_csbh FROM sbgjj_yj_csbh
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -60,23 +60,55 @@ ...@@ -60,23 +60,55 @@
b.is_opinion SpmkCustomApproval_is_opinion, b.is_opinion SpmkCustomApproval_is_opinion,
b.update_time SpmkCustomApproval_update_time, b.update_time SpmkCustomApproval_update_time,
b.create_time SpmkCustomApproval_create_time, b.create_time SpmkCustomApproval_create_time,
b.asso_type SpmkCustomApproval_asso_type<!-- , b.asso_type SpmkCustomApproval_asso_type,
b.is_allvisible SpmkCustomApproval_is_allvisible<!-- ,
b.froms SpmkCustomApproval_froms, b.froms SpmkCustomApproval_froms,
b.router SpmkCustomApproval_router --> b.router SpmkCustomApproval_router -->
</sql> </sql>
<select id="selectListAgInCa" resultMap="BaseResultMapDto"> <select id="selectListAgInCaByAdmin" resultMap="BaseResultMapDto">
SELECT SELECT
<include refid="Base_Column_List_Alias_a" />, <include refid="Base_Column_List_Alias_a" />,
<include refid="Base_Column_List_Alias_ca" /> <include refid="Base_Column_List_Alias_ca" />
FROM spmk_approval_g a FROM spmk_approval_g a
LEFT JOIN spmk_custom_approval b ON a.id = b.approval_g_id LEFT JOIN spmk_custom_approval b
ON a.id = b.approval_g_id
WHERE a.org_code = #{org_code} WHERE a.org_code = #{org_code}
<!-- AND b.id IN ( ORDER BY a.ranks, b.ranks
</select>
<select id="selectListAgInCa" resultMap="BaseResultMapDto">
SELECT
<include refid="Base_Column_List_Alias_a" />,
<include refid="Base_Column_List_Alias_ca" />
FROM spmk_approval_g a
LEFT JOIN spmk_custom_approval b
ON a.id = b.approval_g_id AND ( b.id IN (
SELECT custom_approval_id FROM spmk_initiator_config WHERE asso_id = #{emp_num} AND type = 1 GROUP BY custom_approval_id SELECT custom_approval_id FROM spmk_initiator_config WHERE asso_id = #{emp_num} AND type = 1 GROUP BY custom_approval_id
) --> <if test="deptIds != null and deptIds.size() > 0">
UNION
SELECT custom_approval_id FROM spmk_initiator_config WHERE
<choose>
<when test="deptIds.size() > 1">
asso_id IN
(
<foreach item="it" index="index" collection="deptIds" separator="," close="" >
#{it}
</foreach>
)
</when>
<otherwise>
asso_id = #{deptIds[0]}
</otherwise>
</choose>
AND type IN (2,3) GROUP BY custom_approval_id
</if>
) OR b.is_allvisible = 1)
AND b.is_allvisible <![CDATA[ <> ]]> 2
WHERE a.org_code = #{org_code}
ORDER BY a.ranks, b.ranks ORDER BY a.ranks, b.ranks
</select> </select>
......
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
b.is_opinion SpmkApprovalTemplate_is_opinion, b.is_opinion SpmkApprovalTemplate_is_opinion,
b.update_time SpmkApprovalTemplate_update_time, b.update_time SpmkApprovalTemplate_update_time,
b.create_time SpmkApprovalTemplate_create_time, b.create_time SpmkApprovalTemplate_create_time,
b.asso_type SpmkApprovalTemplate_asso_type, b.asso_type SpmkApprovalTemplate_asso_type<!-- ,
b.froms SpmkApprovalTemplate_froms, b.froms SpmkApprovalTemplate_froms,
b.router SpmkApprovalTemplate_router b.router SpmkApprovalTemplate_router -->
</sql> </sql>
<select id="selectListAtInAtg" resultMap="BaseResultMapDto"> <select id="selectListAtInAtg" resultMap="BaseResultMapDto">
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="asso_type" property="assoType" /> <result column="asso_type" property="assoType" />
<result column="is_allvisible" property="isAllvisible" />
<result column="froms" property="froms" /> <result column="froms" property="froms" />
<result column="router" property="router" /> <result column="router" property="router" />
</resultMap> </resultMap>
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
update_time, update_time,
create_time, create_time,
asso_type, asso_type,
is_allvisible,
froms, froms,
router router
</sql> </sql>
...@@ -50,6 +52,7 @@ ...@@ -50,6 +52,7 @@
update_time SpmkCustomApproval_update_time, update_time SpmkCustomApproval_update_time,
create_time SpmkCustomApproval_create_time, create_time SpmkCustomApproval_create_time,
asso_type SpmkCustomApproval_asso_type, asso_type SpmkCustomApproval_asso_type,
is_allvisible SpmkCustomApproval_is_allvisible,
froms SpmkCustomApproval_froms, froms SpmkCustomApproval_froms,
router SpmkCustomApproval_router router SpmkCustomApproval_router
</sql> </sql>
...@@ -102,6 +105,9 @@ ...@@ -102,6 +105,9 @@
<if test ='null != assoType'> <if test ='null != assoType'>
asso_type, asso_type,
</if> </if>
<if test ='null != isAllvisible'>
is_allvisible,
</if>
<if test ='null != froms'> <if test ='null != froms'>
froms, froms,
</if> </if>
...@@ -143,6 +149,9 @@ ...@@ -143,6 +149,9 @@
<if test ='null != assoType'> <if test ='null != assoType'>
#{assoType}, #{assoType},
</if> </if>
<if test ='null != isAllvisible'>
#{isAllvisible},
</if>
<if test ='null != froms'> <if test ='null != froms'>
#{froms}, #{froms},
</if> </if>
...@@ -171,6 +180,7 @@ ...@@ -171,6 +180,7 @@
<if test ='null != updateTime'>update_time = #{updateTime},</if> <if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != createTime'>create_time = #{createTime},</if> <if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != assoType'>asso_type = #{assoType},</if> <if test ='null != assoType'>asso_type = #{assoType},</if>
<if test ='null != isAllvisible'>is_allvisible = #{isAllvisible},</if>
<if test ='null != froms'>froms = #{froms},</if> <if test ='null != froms'>froms = #{froms},</if>
<if test ='null != router'>router = #{router}</if> <if test ='null != router'>router = #{router}</if>
</set> </set>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
and xzs.xzyf = #{xzyf} and xzs.xzyf = #{xzyf}
</select> </select>
<insert id="insert" parameterType="cn.timer.api.bean.xcgl.XcglAdminXzz" useGeneratedKeys="true" keyProperty="id"> <!-- <insert id="insert" parameterType="cn.timer.api.bean.xcgl.XcglAdminXzz" useGeneratedKeys="true" keyProperty="id">
INSERT INTO xcgl_admin_xzz INSERT INTO xcgl_admin_xzz
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'> <if test ='null != name'>
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_admin_xzz FROM xcgl_admin_xzz
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM xcgl_asso_gztsz DELETE FROM xcgl_asso_gztsz
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_asso_gztsz FROM xcgl_asso_gztsz
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
</insert> </insert>
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt"> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt">
INSERT INTO xcgl_asso_gztzt INSERT INTO xcgl_asso_gztzt
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'> <if test ='null != userid'>
...@@ -224,6 +224,6 @@ ...@@ -224,6 +224,6 @@
SELECT count(1) SELECT count(1)
FROM xcgl_asso_gztzt FROM xcgl_asso_gztzt
</select> </select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -249,11 +249,6 @@ ...@@ -249,11 +249,6 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" >
DELETE FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</delete>
<update id="jsgzzxupdate" parameterType="cn.timer.api.bean.xcgl.XcglAssoJsgzzx"> <update id="jsgzzxupdate" parameterType="cn.timer.api.bean.xcgl.XcglAssoJsgzzx">
UPDATE xcgl_asso_jsgzzx UPDATE xcgl_asso_jsgzzx
<set> <set>
...@@ -274,6 +269,10 @@ ...@@ -274,6 +269,10 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</delete>
<select id="load" resultMap="BaseResultMap"> <select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> SELECT <include refid="Base_Column_List" />
...@@ -290,7 +289,7 @@ ...@@ -290,7 +289,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_asso_jsgzzx FROM xcgl_asso_jsgzzx
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM xcgl_asso_jxgz DELETE FROM xcgl_asso_jxgz
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_asso_jxgz FROM xcgl_asso_jxgz
</select> </select> -->
<select id="selectPayrollGroupList" resultMap="PayGroupedDataMap"> <select id="selectPayrollGroupList" resultMap="PayGroupedDataMap">
select jxgz.id as zid, select jxgz.id as zid,
......
...@@ -184,10 +184,6 @@ ...@@ -184,10 +184,6 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" >
DELETE FROM xcgl_asso_xzb
WHERE id = #{id}
</delete>
<update id="ModifyImportedSalary" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzb"> <update id="ModifyImportedSalary" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzb">
UPDATE xcgl_asso_xzb UPDATE xcgl_asso_xzb
...@@ -196,6 +192,11 @@ ...@@ -196,6 +192,11 @@
and xzyf = #{xzyf} and xzyf = #{xzyf}
and xzxid = #{xzxid} and xzxid = #{xzxid}
</update> </update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzb
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzb"> <update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzb">
UPDATE xcgl_asso_xzb UPDATE xcgl_asso_xzb
...@@ -225,7 +226,7 @@ ...@@ -225,7 +226,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_asso_xzb FROM xcgl_asso_xzb
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzdadx DELETE FROM xcgl_asso_xzdadx
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
...@@ -152,6 +152,6 @@ ...@@ -152,6 +152,6 @@
SELECT count(1) SELECT count(1)
FROM xcgl_asso_xzdadx FROM xcgl_asso_xzdadx
</select> </select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -42,6 +42,13 @@ ...@@ -42,6 +42,13 @@
</insert> </insert>
<delete id="Recorddelete" >
DELETE FROM xcgl_asso_xzdaz
WHERE xzdadxid = #{xzdadxid}
</delete>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdaz"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdaz">
INSERT INTO xcgl_asso_xzdaz INSERT INTO xcgl_asso_xzdaz
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -67,12 +74,8 @@ ...@@ -67,12 +74,8 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<delete id="Recorddelete" >
DELETE FROM xcgl_asso_xzdaz
WHERE xzdadxid = #{xzdadxid}
</delete>
<delete id="delete" > <delete id="delete" >
DELETE FROM xcgl_asso_xzdaz DELETE FROM xcgl_asso_xzdaz
WHERE id = #{id} WHERE id = #{id}
...@@ -104,7 +107,7 @@ ...@@ -104,7 +107,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_asso_xzdaz FROM xcgl_asso_xzdaz
</select> </select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -137,10 +137,10 @@ ...@@ -137,10 +137,10 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzdazdy DELETE FROM xcgl_asso_xzdazdy
WHERE id = #{id} WHERE id = #{id}
</delete> </delete> -->
<update id="dazdyupdate" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdazdy"> <update id="dazdyupdate" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdazdy">
UPDATE xcgl_asso_xzdazdy UPDATE xcgl_asso_xzdazdy
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<!--
<select id="load" resultMap="BaseResultMap"> <select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_xzdazdy FROM xcgl_asso_xzdazdy
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<select id="pageListCount" resultType="java.lang.Integer"> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM xcgl_asso_xzdazdy FROM xcgl_asso_xzdazdy
</select> </select> -->
<select id="selectFixedSalaryStaff" resultMap="FixedSalaryStaffMap"> <select id="selectFixedSalaryStaff" resultMap="FixedSalaryStaffMap">
select emp.emp_num empnum, select emp.emp_num empnum,
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</delete> </delete>
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzury"> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzury">
INSERT INTO xcgl_asso_xzury INSERT INTO xcgl_asso_xzury
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != xzzid'> <if test ='null != xzzid'>
...@@ -149,6 +149,6 @@ ...@@ -149,6 +149,6 @@
SELECT count(1) SELECT count(1)
FROM xcgl_asso_xzury FROM xcgl_asso_xzury
</select> </select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -150,10 +150,10 @@ ...@@ -150,10 +150,10 @@
</trim> </trim>
</insert> </insert>
<delete id="delete" > <!-- <delete id="delete" >
DELETE FROM xcgl_asso_zxfjkc DELETE FROM xcgl_asso_zxfjkc
WHERE id = #{id} WHERE id = #{id}
</delete> </delete> -->
<update id="updateXcglAssoZxfjkc" parameterType="cn.timer.api.bean.xcgl.XcglAssoZxfjkc"> <update id="updateXcglAssoZxfjkc" parameterType="cn.timer.api.bean.xcgl.XcglAssoZxfjkc">
UPDATE xcgl_asso_zxfjkc UPDATE xcgl_asso_zxfjkc
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
</update> </update>
<select id="load" resultMap="BaseResultMap"> <!-- <select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_zxfjkc FROM xcgl_asso_zxfjkc
WHERE id = #{id} WHERE id = #{id}
...@@ -189,6 +189,6 @@ ...@@ -189,6 +189,6 @@
SELECT count(1) SELECT count(1)
FROM xcgl_asso_zxfjkc FROM xcgl_asso_zxfjkc
</select> </select>
-->
</mapper> </mapper>
\ No newline at end of file
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