Commit d8bb2296 by 邓实川

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

parents f149fbd4 e7097c08
...@@ -38,7 +38,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> { ...@@ -38,7 +38,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> {
@ApiModelProperty(value="编号 编号",example="101") @ApiModelProperty(value="编号 编号",example="101")
private Integer id; private Integer id;
@ApiModelProperty(value="组织机构代码 组织机构代码",example="101") @ApiModelProperty(value="组织机构代码 ",example="101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="发票抬头 ",example="发票抬头") @ApiModelProperty(value="发票抬头 ",example="发票抬头")
...@@ -56,7 +56,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> { ...@@ -56,7 +56,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> {
@ApiModelProperty(value="开户银行 ",example="开户银行") @ApiModelProperty(value="开户银行 ",example="开户银行")
private String depositBank; private String depositBank;
@ApiModelProperty(value="开户账号 开户账号",example="101") @ApiModelProperty(value="开户账号",example="101")
private String depositBankAccount; private String depositBankAccount;
@ApiModelProperty(value="是否默认 0:是;1:否",example="101") @ApiModelProperty(value="是否默认 0:是;1:否",example="101")
......
...@@ -38,7 +38,7 @@ public class QyzxAttaQyfj extends Model<QyzxAttaQyfj> { ...@@ -38,7 +38,7 @@ public class QyzxAttaQyfj extends Model<QyzxAttaQyfj> {
@ApiModelProperty(value="编号 编号",example="101") @ApiModelProperty(value="编号 编号",example="101")
private Integer id; private Integer id;
@ApiModelProperty(value="组织机构代码 qyzx_main_qyxx",example="101") @ApiModelProperty(value="组织机构代码",example="101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="附件名称 ",example="附件名称") @ApiModelProperty(value="附件名称 ",example="附件名称")
......
...@@ -72,8 +72,6 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{ ...@@ -72,8 +72,6 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty(value="发票类型",example="0-普通 1-专用") @ApiModelProperty(value="发票类型",example="0-普通 1-专用")
private Integer invoiceType; private Integer invoiceType;
@ApiModelProperty(value="收货人",example="翁🐻") @ApiModelProperty(value="收货人",example="翁🐻")
private String consignee; private String consignee;
......
...@@ -37,21 +37,21 @@ public class QyzxSuggestionFeeback extends Model<QyzxSuggestionFeeback> { ...@@ -37,21 +37,21 @@ public class QyzxSuggestionFeeback extends Model<QyzxSuggestionFeeback> {
@ApiModelProperty(value="员工编号",example="9688") @ApiModelProperty(value="员工编号",example="9688")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="",example="不好用") @ApiModelProperty(value="意见文本",example="不好用")
private String opinionText; private String opinionText;
@ApiModelProperty(value="",example="1") @ApiModelProperty(value="bug类型",example="1")
private Integer bugType; private Integer bugType;
@ApiModelProperty(value="",example="2020-4-20 08:00:00") @ApiModelProperty(value="创建时间",example="2020-4-20 08:00:00")
private Date createTime; private Date createTime;
@ApiModelProperty(value="",example="117") @ApiModelProperty(value="组织机构代码",example="117")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="",example="那别用了") @ApiModelProperty(value="回复",example="那别用了")
private String reply; private String reply;
@ApiModelProperty(value="",example="2020-4-21 08:00:00") @ApiModelProperty(value="回复时间",example="2020-4-21 08:00:00")
private Date replyTime; private Date replyTime;
} }
\ No newline at end of file
...@@ -72,6 +72,9 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -72,6 +72,9 @@ 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")
private Integer assoType;
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "最近处理时间 ", example = "最近处理时间") @ApiModelProperty(value = "最近处理时间 ", example = "最近处理时间")
......
...@@ -31,7 +31,6 @@ import cn.hutool.core.util.NumberUtil; ...@@ -31,7 +31,6 @@ import cn.hutool.core.util.NumberUtil;
import cn.timer.api.bean.qyzx.QyzxAttaFwjsb; import cn.timer.api.bean.qyzx.QyzxAttaFwjsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin; import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntAuth;
import cn.timer.api.bean.qyzx.QyzxEntInfoM; import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.qyzx.QyzxFeebackAccessory; import cn.timer.api.bean.qyzx.QyzxFeebackAccessory;
import cn.timer.api.bean.qyzx.QyzxInvoiceUsual; import cn.timer.api.bean.qyzx.QyzxInvoiceUsual;
...@@ -43,7 +42,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM; ...@@ -43,7 +42,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.dao.qyzx.QyzxAttaFpzlMapper;
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;
...@@ -58,6 +57,7 @@ import cn.timer.api.dto.login.QysDto; ...@@ -58,6 +57,7 @@ import cn.timer.api.dto.login.QysDto;
import cn.timer.api.dto.qyzx.AdminListDto; import cn.timer.api.dto.qyzx.AdminListDto;
import cn.timer.api.dto.qyzx.AttaFpglQueryDto; import cn.timer.api.dto.qyzx.AttaFpglQueryDto;
import cn.timer.api.dto.qyzx.EntauthDto; import cn.timer.api.dto.qyzx.EntauthDto;
import cn.timer.api.dto.qyzx.FeebackDto;
import cn.timer.api.dto.qyzx.LogBuyDto; import cn.timer.api.dto.qyzx.LogBuyDto;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
...@@ -90,9 +90,6 @@ public class QyzxController { ...@@ -90,9 +90,6 @@ public class QyzxController {
private QyzxLogBuyMapper qyzxLogBuyMapper; private QyzxLogBuyMapper qyzxLogBuyMapper;
@Autowired @Autowired
private QyzxAttaFpzlMapper qyzxAttaFpzlMapper;
@Autowired
private QyzxEntAuthMapper qyzxEntAuthMapper; private QyzxEntAuthMapper qyzxEntAuthMapper;
@Autowired @Autowired
...@@ -309,8 +306,11 @@ public class QyzxController { ...@@ -309,8 +306,11 @@ public class QyzxController {
} else { } else {
// 获取权限 // 获取权限
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) // List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, ctrl.getId()).list(); // .eq(ZzglBmgwM::getOrgCode, ctrl.getId()).list();
List<ZzglBmgwM> zzglBmgwMs = zzglBmgwMMapper.selectList(new QueryWrapper<ZzglBmgwM>().lambda().eq(ZzglBmgwM::getOrgCode, ctrl.getId()));
// 传入的部门岗位是登录者的岗位id.获取的list中只有一个元素,不必要 // 传入的部门岗位是登录者的岗位id.获取的list中只有一个元素,不必要
ZzglBmgwM.getupDepts(list, ctrl.getBmgwId(), zzglBmgwMs); ZzglBmgwM.getupDepts(list, ctrl.getBmgwId(), zzglBmgwMs);
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
...@@ -334,220 +334,57 @@ public class QyzxController { ...@@ -334,220 +334,57 @@ public class QyzxController {
} }
} }
/** @Autowired
* 获取开票资料 private OSSUtil oss;
*/
/*
*
* @Override public Result<QyzxEntInfoM> selectfpzl() { Integer orgCode =
* List<QyzxAttaFpzl> qyzxAttaFpzl =
* QyzxAttaFpzl.builder().build().selectList(new
* QueryWrapper<QyzxAttaFpzl>().eq("org_code", orgCode)); return new
* ResultUtil.data("获取发票资料成功", qyzxAttaFpzl); }
*
*
*//**
* 添加/修改开票资料
*
* @param
* @return
*/
/*
* @PostMapping(value = "/fpzl")
*
* @ApiOperation(value = "添加/修改发票资料", httpMethod = "POST", notes = "接口发布说明")
* public Result<QyzxAttaFpzl> addfpzl(@CurrentUser UserBean
* userBean, @RequestBody QyzxAttaFpzl qyzxAttaFpzl) {
* qyzxAttaFpzl.setOrgCode(userBean.getOrgCode());
* qyzxAttaFpzl.insertOrUpdate(); return ResultUtil.data(qyzxAttaFpzl,
* "添加/修改发票资料成功"); }
*
*//**
* 设置默认发票
*
* @param
* @return
*/
/*
* @GetMapping(value = "/defaultfp/{id}")
*
* @ApiOperation(value = "设置默认发票", httpMethod = "GET", notes = "接口发布说明") public
* Result<Void> setdef(@CurrentUser UserBean userBean, @PathVariable("id")
* Integer id) { // 将所有地址设为非默认 UpdateWrapper<QyzxAttaFpzl> updateWrapper = new
* UpdateWrapper<QyzxAttaFpzl>(); QyzxAttaFpzl q =
* QyzxAttaFpzl.builder().orgCode(userBean.getOrgCode()).isDefault(2).build();
* qyzxAttaFpzlMapper.update(q, updateWrapper);
*
* // 根据id将发票设为默认 updateWrapper.eq("id", id); QyzxAttaFpzl w =
* QyzxAttaFpzl.builder().orgCode(userBean.getOrgCode()).id(id).isDefault(1).
* build(); qyzxAttaFpzlMapper.update(w, updateWrapper);
*
* // 返回成功 return ResultUtil.success("设置成功"); }
*
*//**
* 删除开票资料
*
* @param
* @return
*/
/*
* @DeleteMapping(value = "/fpzl/{id}")
*
* @ApiOperation(value = "删除发票资料", httpMethod = "DELETE", notes = "接口发布说明")
* public Result<Integer> deletefpzl(@PathVariable Integer id) {
* QyzxAttaFpzl.builder().build().deleteById(id); return ResultUtil.data(id,
* "删除发票资料成功"); }
*
* // 获取发票管理
*
* @Override public Result<QyzxEntInfoM> selectfpgl() { Integer orgCode =
* qyzxAttaFpgl = QyzxAttaFpgl.builder().build().selectList(new
* QueryWrapper<QyzxAttaFpgl>().eq("org_code", orgCode)); return new
* ResultUtil.data("获取发票管理成功", qyzxAttaFpgl); }
*
*
*//**
* 添加/修改发票管理
*
* @param
* @return
*/
/*
* @PostMapping(value = "/fpgl")
*
* @ApiOperation(value = "添加/修改发票管理", httpMethod = "POST", notes = "接口发布说明")
* public Result<QyzxAttaFpgl> addfpgl(@CurrentUser UserBean
* userBean, @RequestBody QyzxAttaFpgl qyzxAttaFpgl) {
* qyzxAttaFpgl.setOrgCode(userBean.getOrgCode());
* qyzxAttaFpgl.insertOrUpdate(); return ResultUtil.data(qyzxAttaFpgl,
* "添加/修改发票管理成功"); }
*
*//**
* 删除开票资料
*
* @param
* @return
*/
/*
* @DeleteMapping(value = "/fpgl/{id}")
*
* @ApiOperation(value = "删除发票管理", httpMethod = "DELETE", notes = "接口发布说明")
* public Result<Integer> deletefpgl(@PathVariable Integer id) {
* QyzxAttaFpgl.builder().build().deleteById(id); return ResultUtil.data(id,
* "删除发票管理成功"); }
*
*//**
* 开票资料查询
*
* @param
* @return
*/
/*
* @PostMapping(value = "/fpzlquery")
*
* @ApiOperation(value = "发票资料查询", httpMethod = "POST", notes = "接口发布说明") public
* Result<Object> queryfpzl(@CurrentUser UserBean userBean,
*
* @RequestBody QyzxAttaFpzlQueryDto qyzxAttaFpzlQueryDto) { String
* titleOrAddress = qyzxAttaFpzlQueryDto.getNameOrAddress();
*
* Page<QyzxAttaFpzl> page = new Page<QyzxAttaFpzl>(
* qyzxAttaFpzlQueryDto.getCurrentPage() == null ? 1 :
* qyzxAttaFpzlQueryDto.getCurrentPage(), qyzxAttaFpzlQueryDto.getTotalPage() ==
* null ? 10 : qyzxAttaFpzlQueryDto.getTotalPage());
*
* QueryWrapper<QyzxAttaFpzl> queryWrapper = new QueryWrapper<>();
* queryWrapper.eq("org_code",
* userBean.getOrgCode()).and(!StrUtil.hasBlank(titleOrAddress), wq ->
* wq.likeRight("address", titleOrAddress).or().likeRight("title",
* titleOrAddress)); IPage<QyzxAttaFpzl> qyzxAttaFpzlPage =
* QyzxAttaFpzl.builder().build().selectPage(page, queryWrapper);
* List<QyzxAttaFpzl> qyzxAttaFpzls = qyzxAttaFpzlPage.getRecords();
* qyzxAttaFpzlPage.getCurrent(); qyzxAttaFpzlPage.getPages();
* qyzxAttaFpzlPage.getTotal(); qyzxAttaFpzlPage.getSize(); return
* ResultUtil.data(qyzxAttaFpzlPage, qyzxAttaFpzls, "发票资料查询成功"); }
*
*//**
* 发票管理查询
*
* @param
* @return
*//*
* @PostMapping(value = "/fpglquery")
*
* @ApiOperation(value = "发票管理查询", httpMethod = "POST", notes = "接口发布说明") public
* Result<Object> queryfpgl(@CurrentUser UserBean userBean, @RequestBody
* AttaFpglQueryDto attaFpglQueryDto) { String query =
* attaFpglQueryDto.getQuery(); String startTime =
* attaFpglQueryDto.getStartTime(); String endTime =
* attaFpglQueryDto.getEndTime(); Page<QyzxAttaFpgl> page = new
* Page<QyzxAttaFpgl>( attaFpglQueryDto.getCurrentPage() == null ? 1 :
* attaFpglQueryDto.getCurrentPage(), attaFpglQueryDto.getTotalPage() == null ?
* 10 : attaFpglQueryDto.getTotalPage()); Integer orgCode =
* userBean.getOrgCode(); QueryWrapper<QyzxAttaFpgl> queryWrapper = new
* QueryWrapper<>(); queryWrapper.eq("org_code",
* orgCode).gt(!StrUtil.hasBlank(startTime), "create_time", startTime)
* .lt(!StrUtil.hasBlank(endTime), "create_time", endTime)
* .and(!StrUtil.hasBlank(query), wq -> wq.likeRight("title",
* query).or().likeRight("project", query)); List<QyzxAttaFpgl> qyzxAttaFpgls =
* QyzxAttaFpgl.builder().build().selectList(queryWrapper);
*
* queryWrapper.eq("org_code", orgCode) .between(!StrUtil.hasBlank(startTime) &&
* !StrUtil.hasBlank(endTime), "create_time", !StrUtil.hasBlank(startTime) ?
* startTime : "1000-01-01 00:00:00", !StrUtil.hasBlank(endTime) ? endTime :
* "9999-01-01 00:00:00") .and(!StrUtil.hasBlank(query), wq ->
* wq.likeRight("title", query).or().likeRight("project", query));
*
*
*
* IPage<QyzxAttaFpgl> qyzxAttaFpglPage =
* QyzxAttaFpgl.builder().build().selectPage(page, queryWrapper);
* List<QyzxAttaFpgl> qyzxAttaFpgls = qyzxAttaFpglPage.getRecords();
* qyzxAttaFpglPage.getCurrent(); qyzxAttaFpglPage.getPages();
* qyzxAttaFpglPage.getTotal(); qyzxAttaFpglPage.getSize();
*
*
* return ResultUtil.data(page, qyzxAttaFpgls, "发票资料查询成功"); }
*/
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮 // 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
/** /**
* 意见反馈 * 意见反馈
*/ */
/*
* @PostMapping(value = "/feedback")
*
* @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") public
* Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
*
* @RequestParam(required = false) String opinionText, @RequestParam(required =
* false) String moudle,
*
* @Param("files") List<MultipartFile> files) { String url = null; List<String>
* list = new ArrayList<String>(); if (files != null) { for (MultipartFile file
* : files) { String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle
* + "/" + file.getOriginalFilename(); if (file == null || file.getSize() <= 0)
* { return ResultUtil.error("上传的文件为空,请重新选择!"); } else { try { url =
* oss.uploadFile(path, file.getInputStream()); list.add(url); } catch
* (IOException e) { e.printStackTrace(); } } } } QyzxSuggestionFeeback feeback
* = new QyzxSuggestionFeeback(); feeback.setEmpNum(userBean.getEmpNum());
* feeback.setOpinionText(opinionText); feeback.setCreateTime(new Date());
* feeback.setOrgCode(userBean.getOrgCode()); boolean a = feeback.insert(); if
* (a && list.size() > 0) { for (String opinionUrl : list) {
* QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(
* opinionUrl).build().insert(); } } return ResultUtil.success("意见反馈成功!"); }
*/
/**
* 意见反馈2
*/
@PostMapping(value = "/feedback") @PostMapping(value = "/feedback")
@ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean, public Result<String> feedback(@CurrentUser UserBean userBean, @RequestBody FeebackDto feebackDto) {
@RequestParam(required = false) String opinionText, @RequestParam(required = false) String moudle, String opinionText = feebackDto.getOpinionText();
@Param("files") List<MultipartFile> files) { List<String> urlList = feebackDto.getUrlList();
String url = null; QyzxSuggestionFeeback qs = QyzxSuggestionFeeback.builder().orgCode(userBean.getOrgCode()).empNum(userBean.getEmpNum()).opinionText(opinionText).bugType(1).createTime(new Date()).build();
List<String> list = new ArrayList<String>();
if (files != null) { boolean tof = qs.insert();
for (MultipartFile file : files) { Integer feebackId = qs.getId();
String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle + "/" + file.getOriginalFilename(); if (tof) {
if (file == null || file.getSize() <= 0) { for (String str : urlList) {
return ResultUtil.error("上传的文件为空,请重新选择!"); QyzxFeebackAccessory.builder().feebackId(feebackId).opinionUrl(str).build().insert();
} else {
try {
url = OSSUtil.uploadFile(path, file.getInputStream());
list.add(url);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
QyzxSuggestionFeeback feeback = new QyzxSuggestionFeeback();
feeback.setEmpNum(userBean.getEmpNum());
feeback.setOpinionText(opinionText);
feeback.setCreateTime(new Date());
feeback.setOrgCode(userBean.getOrgCode());
boolean a = feeback.insert();
if (a && list.size() > 0) {
for (String opinionUrl : list) {
QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(opinionUrl).build().insert();
} }
return ResultUtil.data("意见反馈成功!");
} }
return ResultUtil.success("意见反馈成功!");
return ResultUtil.data("意见反馈失败!");
} }
/** /**
......
...@@ -67,6 +67,7 @@ import cn.timer.api.dao.spmk.SpmkSpzMapper; ...@@ -67,6 +67,7 @@ import cn.timer.api.dao.spmk.SpmkSpzMapper;
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;
import cn.timer.api.dto.spmk.MySummaryQueryDto;
import cn.timer.api.dto.spmk.Router; import cn.timer.api.dto.spmk.Router;
import cn.timer.api.dto.spmk.Spmk; import cn.timer.api.dto.spmk.Spmk;
import cn.timer.api.dto.spmk.SpmkApprovalTemplateDto; import cn.timer.api.dto.spmk.SpmkApprovalTemplateDto;
...@@ -83,7 +84,7 @@ import cn.timer.api.dto.spmk.SpmkSpzSpglDto; ...@@ -83,7 +84,7 @@ import cn.timer.api.dto.spmk.SpmkSpzSpglDto;
import cn.timer.api.dto.spmk.SummaryQueryDto; 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.RouterUtils; import cn.timer.api.utils.router.RouterUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -805,6 +806,7 @@ public class SpmkServiceImpl { ...@@ -805,6 +806,7 @@ public class SpmkServiceImpl {
.title(spmkApproveSummaryDto.getTitle()) .title(spmkApproveSummaryDto.getTitle())
.initiator(spmkApproveSummaryDto.getInitiator()) .initiator(spmkApproveSummaryDto.getInitiator())
.approveName(spmkApproveSummaryDto.getApproveName()) .approveName(spmkApproveSummaryDto.getApproveName())
.assoType(spmkApproveSummaryDto.getAssoType())
.sts(0) .sts(0)
.currentApprover(currentApprover).build(); .currentApprover(currentApprover).build();
...@@ -844,10 +846,26 @@ public class SpmkServiceImpl { ...@@ -844,10 +846,26 @@ public class SpmkServiceImpl {
summaryQueryDto.getCurrentPage() == null ? 1 : summaryQueryDto.getCurrentPage(), summaryQueryDto.getCurrentPage() == null ? 1 : summaryQueryDto.getCurrentPage(),
summaryQueryDto.getTotalPage() == null ? 10 : summaryQueryDto.getTotalPage()); summaryQueryDto.getTotalPage() == null ? 10 : summaryQueryDto.getTotalPage());
summaryQueryDto.setOrgCode(userBean.getOrgCode()); summaryQueryDto.setOrgCode(userBean.getOrgCode());
Integer deptId = summaryQueryDto.getDeptId();
List<YgglMainEmp> listYgglMainEmp = RouterUtils.selectOtherlistent(userBean.getOrgCode(), deptId);
Console.log("listYgglMainEmp:"+ listYgglMainEmp);
if (deptId != null && (listYgglMainEmp == null || listYgglMainEmp.size() == 0)) {
return ResultUtil.data(new ArrayList<SpmkApproveSummary>(), "操作成功!");
}
List<Integer> empNums = new ArrayList<Integer>();
for (YgglMainEmp ygglMainEmp : listYgglMainEmp) {
empNums.add(ygglMainEmp.getEmpNum());
}
summaryQueryDto.setEmpNums(empNums);
// 缺-部门id 搜索 // 缺-部门id 搜索
List<SpmkApproveSummary> listAs = spmkApproveSummaryMapper.selectPageByQuery(page, summaryQueryDto); IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQuery(page, summaryQueryDto);
List<SpmkApproveSummary> listAs = pageAs.getRecords();
return ResultUtil.data(listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
} }
//TODO 审批详情 //TODO 审批详情
...@@ -866,10 +884,10 @@ public class SpmkServiceImpl { ...@@ -866,10 +884,10 @@ public class SpmkServiceImpl {
BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord"); BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord");
adD.setRequestData(ObjectUtil.unserialize(ad.getRequestData())); adD.setRequestData(ObjectUtil.unserialize(ad.getRequestData()));
adD.setFroms(ObjectUtil.unserialize(ad.getFroms())); adD.setFroms((List<JSONObject>)ObjectUtil.unserialize(ad.getFroms()));
adD.setRouter((Router)ObjectUtil.unserialize(ad.getRouter())); adD.setRouter((Router)ObjectUtil.unserialize(ad.getRouter()));
adD.setListFlowChildren((List<FlowChildren>)ObjectUtil.unserialize(ad.getFlowChildren())); adD.setFlowChildren((List<FlowChildren>)ObjectUtil.unserialize(ad.getFlowChildren()));
adD.setListSpmkApproveExecuteRecord(listAer); adD.setApproveExecuteRecord(listAer);
return ResultUtil.data(adD, "操作成功!"); return ResultUtil.data(adD, "操作成功!");
} }
...@@ -887,6 +905,16 @@ public class SpmkServiceImpl { ...@@ -887,6 +905,16 @@ public class SpmkServiceImpl {
.lambda() .lambda()
.eq(SpmkApproveDetail::getApproveSummaryId, approvingDto.getAsId())); .eq(SpmkApproveDetail::getApproveSummaryId, approvingDto.getAsId()));
// 查询 SpmkApproveSummary 状态
SpmkApproveSummary aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts)
.eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() == 2 || aSummary.getSts() == 3) {
return ResultUtil.error("该审批已结束!");
}
// 查询该 审批的状态 是否为 1 审批中
Integer count = SpmkExecutor.builder().build().selectCount(new QueryWrapper<SpmkExecutor>().lambda() Integer count = SpmkExecutor.builder().build().selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId()) .eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getSts, "1")); .eq(SpmkExecutor::getSts, "1"));
...@@ -895,7 +923,6 @@ public class SpmkServiceImpl { ...@@ -895,7 +923,6 @@ public class SpmkServiceImpl {
return ResultUtil.error("您已审批过!"); return ResultUtil.error("您已审批过!");
} }
SpmkApproveSummary aSummary = spmkApproveSummaryMapper.selectById(approvingDto.getAsId());
if (aSummary.getSts() == 0) { if (aSummary.getSts() == 0) {
List<FlowChildren> listFlowChildren = (List<FlowChildren>)ObjectUtil.unserialize(ad.getFlowChildren()); List<FlowChildren> listFlowChildren = (List<FlowChildren>)ObjectUtil.unserialize(ad.getFlowChildren());
RouterUtils.approving( RouterUtils.approving(
...@@ -909,21 +936,60 @@ public class SpmkServiceImpl { ...@@ -909,21 +936,60 @@ public class SpmkServiceImpl {
System.out.println(listFlowChildren); System.out.println(listFlowChildren);
// 更新 flowChildren // 更新 flowChildren
SpmkApproveDetail.builder().id(ad.getId()).flowChildren(ObjectUtil.serialize(listFlowChildren)).build().updateById(); SpmkApproveDetail.builder().id(ad.getId()).flowChildren(ObjectUtil.serialize(listFlowChildren)).build().updateById();
FlowChildren fc = CollUtil.getLast(listFlowChildren);
if (CollUtil.getLast(listFlowChildren).getExecute() == "2") { if (fc.getExecute() == "2") {
// 更新 审批汇总 状态 // 查询 SpmkApproveSummary 状态
SpmkApproveSummary.builder().id(approvingDto.getAsId()).endTime(new Date()).sts(2).build().updateById(); aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts)
.eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != 3) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).endTime(new Date()).sts(2).build().updateById();
}
} }
}else { }else {
return ResultUtil.error("该审批已结束!"); return ResultUtil.error("该审批已结束!");
} }
return ResultUtil.data(null, "操作成功!"); return ResultUtil.data(null, "操作成功!");
} }
//TODO 我审批的/抄送我的
/**
* 查询列表-我审批的/抄送我的-分页
*/
@PostMapping(value = "/select_my_approve")
@ApiOperation(value = "21.查询列表-我审批的/抄送我的-分页", httpMethod = "POST", notes = "查询列表-我审批的-关键字、审批状态、发起时间-分页")
@ApiOperationSupport(order = 18)
public Result<Object> selectMyAs(@CurrentUser UserBean userBean, @RequestBody MySummaryQueryDto mySummaryQueryDto) {
IPage<SpmkApproveSummary> page = new Page<SpmkApproveSummary>(
mySummaryQueryDto.getCurrentPage() == null ? 1 : mySummaryQueryDto.getCurrentPage(),
mySummaryQueryDto.getTotalPage() == null ? 10 : mySummaryQueryDto.getTotalPage());
mySummaryQueryDto.setOrgCode(userBean.getOrgCode());
mySummaryQueryDto.setEmpNum(userBean.getEmpNum());
// 缺-部门id 搜索
IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(page, mySummaryQueryDto);
List<SpmkApproveSummary> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
/**
* 删除-审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据
*/
@DeleteMapping(value = "/delete_approval_data")
@ApiOperation(value = "90.(开发使用)删除-审批数据", httpMethod = "DELETE", notes = "审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据")
@ApiOperationSupport(order = 10)
public Result<Object> deleteApprovalData(@CurrentUser UserBean userBean){
spmkApproveSummaryMapper.delete(null);
spmkApproveDetailMapper.delete(null);
spmkApproveExecuteRecordMapper.delete(null);
spmkExecutorMapper.delete(null);
return ResultUtil.data(null, "操作成功!");
}
} }
...@@ -8,7 +8,9 @@ import org.springframework.stereotype.Repository; ...@@ -8,7 +8,9 @@ import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.dzht.DzhtAssoHtmb;
import cn.timer.api.bean.spmk.SpmkApproveSummary; import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.dto.spmk.MySummaryQueryDto;
import cn.timer.api.dto.spmk.SummaryQueryDto; import cn.timer.api.dto.spmk.SummaryQueryDto;
/** /**
...@@ -19,6 +21,8 @@ import cn.timer.api.dto.spmk.SummaryQueryDto; ...@@ -19,6 +21,8 @@ import cn.timer.api.dto.spmk.SummaryQueryDto;
@Repository @Repository
public interface SpmkApproveSummaryMapper extends BaseMapper<SpmkApproveSummary> { public interface SpmkApproveSummaryMapper extends BaseMapper<SpmkApproveSummary> {
List<SpmkApproveSummary> selectPageByQuery(IPage<SpmkApproveSummary> page,@Param("param") SummaryQueryDto summaryQueryDto); IPage<SpmkApproveSummary> selectPageByQuery(IPage<SpmkApproveSummary> page,@Param("param") SummaryQueryDto summaryQueryDto);
IPage<SpmkApproveSummary> selectPageByQueryForEmpNum(IPage<SpmkApproveSummary> page,@Param("param") MySummaryQueryDto mySummaryQueryDto);
} }
/**
* @date 2020年4月27日
* @author 翁东州
* @方法中文名称:
*/
package cn.timer.api.dto.qyzx;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @date 2020年4月27日
* @author 翁东州
* @方法中文名称:
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FeebackDto implements Serializable{
/**
* @date 2020年4月27日
* @author 翁东州
* @方法中文名称:
*/
private static final long serialVersionUID = 4457381912053961473L;
@ApiModelProperty(value = "填写内容", example = "13129310893")
private String opinionText;
@ApiModelProperty(value = "附件地址", example = "123456")
private List<String> urlList;
}
package cn.timer.api.dto.spmk;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MySummaryQueryDto extends Page{
private Integer orgCode;
private Integer empNum;
@ApiModelProperty(value = "关键字", example = "请假")
private String query;
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "0")
private Integer sts;
@ApiModelProperty(value = "开始时间 ", example = "2000-10-10 10:10:10")
private String startTime;
@ApiModelProperty(value = "结束时间 ", example = "2020-10-10 10:10:10")
private String endTime;
@ApiModelProperty(value = "1抄送人 2审批人 3连续多级主管", example = "0")
private Integer type;
}
...@@ -32,15 +32,15 @@ public class SpmkApproveDetailDto { ...@@ -32,15 +32,15 @@ public class SpmkApproveDetailDto {
private JSONObject requestData; private JSONObject requestData;
@ApiModelProperty(value = "审批表单 ", example = "审批表单") @ApiModelProperty(value = "审批表单 ", example = "审批表单")
private JSONObject froms; private List<JSONObject> froms;
@ApiModelProperty(value = "审批流程 ", example = "审批流程") @ApiModelProperty(value = "审批流程 ", example = "审批流程")
private Router router; private Router router;
@ApiModelProperty(value = "通过节点", example = "通过节点") @ApiModelProperty(value = "通过节点", example = "通过节点")
private List<FlowChildren> listFlowChildren; private List<FlowChildren> flowChildren;
@ApiModelProperty(value = "审批执行记录 ", example = "审批执行记录") @ApiModelProperty(value = "审批执行记录 ", example = "审批执行记录")
private List<SpmkApproveExecuteRecord> listSpmkApproveExecuteRecord; private List<SpmkApproveExecuteRecord> approveExecuteRecord;
} }
...@@ -32,8 +32,9 @@ public class SpmkApproveSummaryDto{ ...@@ -32,8 +32,9 @@ public class SpmkApproveSummaryDto{
@ApiModelProperty(value = "发起人名称 ", example = "发起人名称") @ApiModelProperty(value = "发起人名称 ", example = "发起人名称")
private String initiator; private String initiator;
@ApiModelProperty(value = "关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "5")
private Integer assoType;
@ApiModelProperty(value = "申请数据 ", example = "申请数据") @ApiModelProperty(value = "申请数据 ", example = "申请数据")
private JSONObject requestData; private JSONObject requestData;
......
package cn.timer.api.dto.spmk; package cn.timer.api.dto.spmk;
import java.util.List;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.utils.Page; import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -15,16 +18,21 @@ public class SummaryQueryDto extends Page{ ...@@ -15,16 +18,21 @@ public class SummaryQueryDto extends Page{
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value = "关键字", example = "请假")
private String query; private String query;
@ApiModelProperty(value = "部门id", example = "10")
private Integer deptId; private Integer deptId;
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "0")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "开始时间 ", example = "2000-10-10 10:10:10")
private String startTime; private String startTime;
@ApiModelProperty(value = "结束时间 ", example = "2020-10-10 10:10:10")
private String endTime; private String endTime;
private String[] empNums; private List<Integer> empNums;
} }
package cn.timer.api.utils.router;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public abstract class Compare {
protected String strA = "";
protected String strB = "";
public abstract boolean GetResutl();
}
package cn.timer.api.utils.router;
public class CompareFactory{
public static Compare createCompare(String strA, String strB, String compare) {
Compare comp = null;
switch (compare) {
case "<":
comp = new LtCompare(strA,strB);
break;
case "<=":
comp = new LtOREqualCompare(strA,strB);
break;
case "=":
comp = new EqualCompare(strA,strB);
break;
case ">":
comp = new GtCompare(strA,strB);
break;
case ">=":
comp = new GtOREqualCompare(strA,strB);
break;
default :
comp = new EqualCompare(strA,strB);
break;
}
return comp;
}
}
package cn.timer.api.utils.router;
public class EqualCompare extends Compare {
public EqualCompare() {
super();
}
public EqualCompare(String strA, String strB) {
super(strA, strB);
}
@Override
public boolean GetResutl() {
return strA.equals(strB) ? true : false;
}
}
package cn.timer.api.utils.router;
import cn.hutool.core.util.NumberUtil;
public class GtCompare extends Compare {
public GtCompare(){
super();
}
public GtCompare(String strA, String strB){
super(strA,strB);
}
@Override
public boolean GetResutl() {
return NumberUtil.compare(Double.parseDouble(strA),Double.parseDouble(strB)) == 1
? true : false;
}
}
package cn.timer.api.utils.router;
import cn.hutool.core.util.NumberUtil;
public class GtOREqualCompare extends Compare {
public GtOREqualCompare() {
super();
}
public GtOREqualCompare(String strA, String strB) {
super(strA,strB);
}
@Override
public boolean GetResutl() {
double d1 = Double.parseDouble(strA);
double d2 = Double.parseDouble(strB);
return NumberUtil.compare(d1,d2) >= 0
? true : false;
}
}
package cn.timer.api.utils.router;
import cn.hutool.core.util.NumberUtil;
public class LtCompare extends Compare {
public LtCompare(){
super();
}
public LtCompare(String strA, String strB){
super(strA,strB);
}
@Override
public boolean GetResutl() {
return NumberUtil.compare(Double.parseDouble(strA),Double.parseDouble(strB)) == -1
? true : false;
}
}
package cn.timer.api.utils.router;
import cn.hutool.core.util.NumberUtil;
import lombok.Data;
public class LtOREqualCompare extends Compare {
public LtOREqualCompare(){
super();
}
public LtOREqualCompare(String strA, String strB){
super(strA,strB);
}
@Override
public boolean GetResutl() {
double d1 = Double.parseDouble(strA);
double d2 = Double.parseDouble(strB);
return NumberUtil.compare(d1,d2) <= 0
? true : false;
}
}
package cn.timer.api.utils; package cn.timer.api.utils.router;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -180,11 +180,15 @@ public class RouterUtils { ...@@ -180,11 +180,15 @@ public class RouterUtils {
routerRule.setFlow(true); routerRule.setFlow(true);
}else { }else {
for (Condition condition : listCondition) { for (Condition condition : listCondition) {
Compare compare ;
for (String string : condition.getValues()) { for (String string : condition.getValues()) {
// 判断条件
if (!stringCompare(obj.get(condition.getKey(),FromData.class).getValue(), string , condition.getFormat())) { // 简单工厂模式 - 判断条件
compare = CompareFactory.createCompare(obj.get(condition.getKey(),FromData.class).getValue(), string, condition.getFormat());
if (!compare.GetResutl()) {
condition_b = false; condition_b = false;
} }
} }
} }
} }
...@@ -285,9 +289,6 @@ public class RouterUtils { ...@@ -285,9 +289,6 @@ public class RouterUtils {
}else if (listRouter.size() > 1) { }else if (listRouter.size() > 1) {
for (Router router2 : listRouter) { for (Router router2 : listRouter) {
if (router2.getFlow()) { if (router2.getFlow()) {
// FlowChildren fc = FlowChildren.builder().build();
// BeanUtil.copyProperties(router2, fc, "condition","children");
// listFlowChildren.add(fc);
getIsFlowChildren(router2.getChildren(), listFlowChildren); getIsFlowChildren(router2.getChildren(), listFlowChildren);
} }
} }
...@@ -439,6 +440,14 @@ public class RouterUtils { ...@@ -439,6 +440,14 @@ public class RouterUtils {
if (sts == 3) { if (sts == 3) {
// 更新 审批汇总 状态 // 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).endTime(new Date()).sts(sts).build().updateById(); SpmkApproveSummary.builder().id(asId).endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord
.builder()
.id(executeRecordId)
.sts(sts)
.build()
// 更新 审批执行记录
.updateById();
listFlowChildren.get(i_user).setExecute(EXECUTED);
return; return;
} }
}else if (UNEXECUTED.equals(listUser.get(i_user).getExecute())) { }else if (UNEXECUTED.equals(listUser.get(i_user).getExecute())) {
...@@ -454,9 +463,13 @@ public class RouterUtils { ...@@ -454,9 +463,13 @@ public class RouterUtils {
// 当前审批人 // 当前审批人
SpmkApproveSummary.builder().id(asId).currentApprover(listUser.get(i_user).getName()).build().updateById(); SpmkApproveSummary.builder().id(asId).currentApprover(listUser.get(i_user).getName()).build().updateById();
// 处理了 下一个审批人 则跳出循环
break;
} }
} }
// 无下一个审批人 则更新 节点状态 为 EXECUTED(已执行)
if (!hasNextApprover) { if (!hasNextApprover) {
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder() .builder()
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="current_approver" property="currentApprover" /> <result column="current_approver" property="currentApprover" />
<result column="history_approver" property="historyApprover" /> <result column="history_approver" property="historyApprover" />
<result column="asso_type" property="assoType" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="end_time" property="endTime" /> <result column="end_time" property="endTime" />
<result column="digest" property="digest" /> <result column="digest" property="digest" />
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
sts, sts,
current_approver, current_approver,
history_approver, history_approver,
asso_type,
update_time, update_time,
end_time, end_time,
digest digest
...@@ -49,6 +51,7 @@ ...@@ -49,6 +51,7 @@
a.sts, a.sts,
a.current_approver, a.current_approver,
a.history_approver, a.history_approver,
a.asso_type,
a.update_time, a.update_time,
a.end_time, a.end_time,
a.digest a.digest
...@@ -66,6 +69,7 @@ ...@@ -66,6 +69,7 @@
sts SpmkApproveSummary_sts, sts SpmkApproveSummary_sts,
current_approver SpmkApproveSummary_current_approver, current_approver SpmkApproveSummary_current_approver,
history_approver SpmkApproveSummary_history_approver, history_approver SpmkApproveSummary_history_approver,
asso_type SpmkApproveSummary_asso_type,
update_time SpmkApproveSummary_update_time, update_time SpmkApproveSummary_update_time,
end_time SpmkApproveSummary_end_time, end_time SpmkApproveSummary_end_time,
digest SpmkApproveSummary_digest digest SpmkApproveSummary_digest
...@@ -74,11 +78,11 @@ ...@@ -74,11 +78,11 @@
<select id="selectPageByQuery" resultMap="BaseResultMap" > <select id="selectPageByQuery" resultMap="BaseResultMap" >
SELECT SELECT
<include refid="Base_Column_List_a" />, <include refid="Base_Column_List_a" />,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num)) as gw_name, (SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) as gw_name,
(SELECT id FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num) )) as bm_id, (SELECT id FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) limit 1) as bm_id,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num) )) as bm_name (SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) limit 1) as bm_name
FROM spmk_approve_summary a FROM spmk_approve_summary a
WHERE 1 = 1 WHERE a.org_code = #{param.orgCode}
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and ( and (
a.title like CONCAT(#{param.query},'%') or a.title like CONCAT(#{param.query},'%') or
...@@ -86,12 +90,65 @@ ...@@ -86,12 +90,65 @@
a.id like CONCAT(#{param.query},'%') a.id like CONCAT(#{param.query},'%')
) )
</if> </if>
<if test="param.sts != null and param.sts != ''">
and a.sts = #{param.sts}
</if>
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and a.create_time <![CDATA[ >= ]]> #{param.startTime} and a.create_time <![CDATA[ >= ]]> #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and qlb.create_time <![CDATA[ <= ]]> #{param.endTime} and qlb.create_time <![CDATA[ <= ]]> #{param.endTime}
</if> </if>
<if test="param.empNums != null and param.empNums.size() > 0">
and a.emp_num IN
(
<foreach item="it" index="index" collection="param.empNums" separator="," close="" >
#{it}
</foreach>
)
</if>
ORDER BY a.id DESC
</select>
<select id="selectPageByQueryForEmpNum" resultMap="BaseResultMap" >
SELECT
<include refid="Base_Column_List_a" />,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) as gw_name,
(SELECT id FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) limit 1) as bm_id,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) limit 1) as bm_name
FROM spmk_approve_summary a
WHERE a.org_code = #{param.orgCode}
<if test="param.type != null and param.type >= 1">
and a.id in
(SELECT approve_summary_id FROM spmk_approve_execute_record WHERE id IN
(SELECT approve_execute_record_id FROM spmk_executor WHERE emp_num = #{param.empNum})
and type = #{param.type}
)
</if>
<if test="param.type != null and param.type == 0">
and a.emp_num = #{param.empNum}
</if>
<if test="param.sts != null and param.sts != ''">
and a.sts = #{param.sts}
</if>
<if test="param.query != null and param.query != ''">
and (
a.title like CONCAT(#{param.query},'%') or
a.initiator like CONCAT(#{param.query},'%') or
a.id like CONCAT(#{param.query},'%')
)
</if>
<if test="param.startTime != null and param.startTime != ''">
and a.create_time <![CDATA[ >= ]]> #{param.startTime}
</if>
<if test="param.endTime != null and param.endTime != ''">
and qlb.create_time <![CDATA[ <= ]]> #{param.endTime}
</if>
ORDER BY a.id DESC
</select> </select>
...@@ -130,6 +187,9 @@ ...@@ -130,6 +187,9 @@
<if test ='null != historyApprover'> <if test ='null != historyApprover'>
history_approver, history_approver,
</if> </if>
<if test ='null != assoType'>
asso_type,
</if>
<if test ='null != updateTime'> <if test ='null != updateTime'>
update_time, update_time,
</if> </if>
...@@ -171,6 +231,9 @@ ...@@ -171,6 +231,9 @@
<if test ='null != historyApprover'> <if test ='null != historyApprover'>
#{historyApprover}, #{historyApprover},
</if> </if>
<if test ='null != assoType'>
#{assoType},
</if>
<if test ='null != updateTime'> <if test ='null != updateTime'>
#{updateTime}, #{updateTime},
</if> </if>
...@@ -201,6 +264,7 @@ ...@@ -201,6 +264,7 @@
<if test ='null != sts'>sts = #{sts},</if> <if test ='null != sts'>sts = #{sts},</if>
<if test ='null != currentApprover'>current_approver = #{currentApprover},</if> <if test ='null != currentApprover'>current_approver = #{currentApprover},</if>
<if test ='null != historyApprover'>history_approver = #{historyApprover},</if> <if test ='null != historyApprover'>history_approver = #{historyApprover},</if>
<if test ='null != assoType'>asso_type = #{assoType},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if> <if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != endTime'>end_time = #{endTime},</if> <if test ='null != endTime'>end_time = #{endTime},</if>
<if test ='null != digest'>digest = #{digest}</if> <if test ='null != digest'>digest = #{digest}</if>
......
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