Browse Source

Merge remote-tracking branch 'origin/master'

master
ligaode 4 months ago
parent
commit
5d7a377090
  1. 10
      anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatecheck.js
  2. 10
      anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatewithholding.js
  3. 10
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js
  4. 10
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js
  5. 27
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatecheckInfo.vue
  6. 27
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatewithholding/bicyclerebatewithholdingInfo.vue
  7. 27
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckInfo.vue
  8. 27
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue
  9. 27
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiYiBanInfo.vue
  10. 27
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliyutiFlow/danchefanliyutiYiBanInfo.vue
  11. 27
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue
  12. 27
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue
  13. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/api/OaMendApplyRest.java
  14. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaappendix/OaAppendixMapper.java
  15. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaappendix/OaAppendixMapper.xml
  16. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaappendix/OaAppendixService.java
  17. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaForm.java
  18. 3
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormDto.java
  19. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormMapper.java
  20. 16
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormMapper.xml
  21. 7
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormService.java
  22. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oahiredetails/OaHireDetailsMapper.java
  23. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oahiredetails/OaHireDetailsMapper.xml
  24. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oahiredetails/OaHireDetailsService.java
  25. 42
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/OaMendApply.java
  26. 38
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/OaMendApplyDto.java
  27. 204
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/OaMendApplyService.java
  28. 1
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/flowable/SubmitOaMendApplyDto.java

10
anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatecheck.js

@ -98,6 +98,16 @@ export default {
method: 'get' method: 'get'
}) })
}, },
// 导出
downloadExcel: function(data) {
return request({
url: '/scm/v1/scmvehrebatecheckapply/excelList',
method: 'post',
params: data,
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: { 'Content-Type': 'application/json' }
})
},
createPdf: function(data) { createPdf: function(data) {
return request({ return request({
url: '/scm/v1/scmvehrebatecheckapply/createPdf', url: '/scm/v1/scmvehrebatecheckapply/createPdf',

10
anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatewithholding.js

@ -51,6 +51,16 @@ export default {
method: 'get' method: 'get'
}) })
}, },
// 导出
downloadExcel: function(data) {
return request({
url: '/scm/v1/scmvehrebatewith/excelList',
method: 'post',
params: data,
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: { 'Content-Type': 'application/json' }
})
},
createPdf: function(data) { createPdf: function(data) {
return request({ return request({
url: '/scm/v1/scmvehrebatewithapply/createPdf', url: '/scm/v1/scmvehrebatewithapply/createPdf',

10
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js

@ -98,6 +98,16 @@ export default {
method: 'get' method: 'get'
}) })
}, },
// 导出
downloadExcel: function(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/excelList',
method: 'post',
params: data,
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: { 'Content-Type': 'application/json' }
})
},
createPdf: function(data) { createPdf: function(data) {
return request({ return request({
url: '/scm/v1/scmspecialrebatecheckapply/createPdf', url: '/scm/v1/scmspecialrebatecheckapply/createPdf',

10
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js

@ -51,6 +51,16 @@ export default {
method: 'get' method: 'get'
}) })
}, },
// 导出
downloadExcel: function(data) {
return request({
url: '/scm/v1/scmspecialrebatewith/excelList',
method: 'post',
params: data,
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: { 'Content-Type': 'application/json' }
})
},
createPdf: function(data) { createPdf: function(data) {
return request({ return request({
url: '/scm/v1/scmspecialrebatewithapply/createPdf', url: '/scm/v1/scmspecialrebatewithapply/createPdf',

27
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatecheckInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
@ -184,6 +184,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '单车返利核对明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ vehCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ vehCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatewithholding/bicyclerebatewithholdingInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
@ -163,6 +163,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '单车返利预提明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ vehWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ vehWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
@ -183,6 +183,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '专项返利核对明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ specialCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ specialCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
@ -191,6 +191,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '专项返利预提明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiYiBanInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> <el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div> </div>
@ -220,6 +220,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '单车返利核对明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ vehCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ vehCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliyutiFlow/danchefanliyutiYiBanInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> <el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div> </div>
@ -155,6 +155,31 @@ export default {
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '单车返利预提明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ vehWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ vehWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> <el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div> </div>
@ -219,6 +219,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '专项返利核对明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ specialCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ specialCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

27
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue

@ -7,7 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> <el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div> </div>
@ -226,6 +226,31 @@ export default {
}) })
return sums return sums
}, },
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '专项返利预提明细' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
download() { download() {
req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') { if (resp.success && resp.data !== '') {

6
yxt-oa/src/main/java/com/yxt/anrui/oa/api/OaMendApplyRest.java

@ -74,10 +74,8 @@ public class OaMendApplyRest {
@ApiOperation("新增或修改") @ApiOperation("新增或修改")
@PostMapping("/save") @PostMapping("/save")
public ResultBean save(@RequestBody OaMendApplyDto dto){ public ResultBean<String> save(@RequestBody OaMendApplyDto dto){
ResultBean rb = ResultBean.fireFail(); return oaMendApplyService.saveOrUpdateDto(dto);
oaMendApplyService.saveOrUpdateDto(dto);
return rb.success();
} }
@ApiOperation("根据sid批量删除") @ApiOperation("根据sid批量删除")

2
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaappendix/OaAppendixMapper.java

@ -36,4 +36,6 @@ public interface OaAppendixMapper extends BaseMapper<OaAppendix> {
@Select("select * from oa_appendix where linkSid = #{linkSid}") @Select("select * from oa_appendix where linkSid = #{linkSid}")
List<OaAppendix> fetchByLinkSid(String linkSid); List<OaAppendix> fetchByLinkSid(String linkSid);
int deleteByLinkSid(String sid);
} }

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaappendix/OaAppendixMapper.xml

@ -3,4 +3,10 @@
<mapper namespace="com.yxt.anrui.oa.biz.oaappendix.OaAppendixMapper"> <mapper namespace="com.yxt.anrui.oa.biz.oaappendix.OaAppendixMapper">
<!-- <where> ${ew.sqlSegment} </where>--> <!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} --> <!-- ${ew.customSqlSegment} -->
<delete id="deleteByLinkSid">
delete
from oa_appendix
where linkSid = #{sid}
</delete>
</mapper> </mapper>

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaappendix/OaAppendixService.java

@ -36,4 +36,8 @@ public class OaAppendixService extends MybatisBaseService<OaAppendixMapper, OaAp
public List<OaAppendix> fetchByLinkSid(String linkSid) { public List<OaAppendix> fetchByLinkSid(String linkSid) {
return baseMapper.fetchByLinkSid(linkSid); return baseMapper.fetchByLinkSid(linkSid);
} }
public int deleteByLinkSid(String sid) {
return baseMapper.deleteByLinkSid(sid);
}
} }

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaForm.java

@ -44,10 +44,6 @@ public class OaForm extends BaseEntity {
private String createOrgSid; private String createOrgSid;
@ApiModelProperty("创建组织") @ApiModelProperty("创建组织")
private String createOrgName; private String createOrgName;
@ApiModelProperty("图片,冗余字段")
private String imgs;
@ApiModelProperty("附件,冗余字段")
private String appendixs;
@ApiModelProperty("关联审批单") @ApiModelProperty("关联审批单")
private String linkFormSids; private String linkFormSids;

3
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormDto.java

@ -15,9 +15,10 @@ import java.util.Date;
public class OaFormDto { public class OaFormDto {
private String sid; private String sid;
private String createBySid;
@ApiModelProperty("创建人") @ApiModelProperty("创建人")
private String createByName; private String createByName;
private String billNo;
@ApiModelProperty("公司sid") @ApiModelProperty("公司sid")
private String useOrgSid; private String useOrgSid;
@ApiModelProperty("公司名称") @ApiModelProperty("公司名称")

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormMapper.java

@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Map;
/** /**
* @description: * @description:
* @author: dimengzhe * @author: dimengzhe
@ -17,4 +19,6 @@ public interface OaFormMapper extends BaseMapper<OaForm> {
OaFormDetailsVo fetchDetailsBySid(String sid); OaFormDetailsVo fetchDetailsBySid(String sid);
IPage<OaFormVo> selectPageVo(IPage<OaForm> page, @Param(Constants.WRAPPER) QueryWrapper<OaForm> qw); IPage<OaFormVo> selectPageVo(IPage<OaForm> page, @Param(Constants.WRAPPER) QueryWrapper<OaForm> qw);
int updateFlowFiled(Map<String, Object> map);
} }

16
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormMapper.xml

@ -15,4 +15,20 @@
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>
</select> </select>
<update id="updateFlowFiled">
UPDATE oa_form
SET nodeState=#{nodeState}
, nodeId=#{taskDefKey}
<if test="procDefId != null and procDefId != ''">
, procDefId=#{procDefId}
</if>
<if test="procInsId != null and procInsId != ''">
, procInstId=#{procInsId}
</if>
<if test="taskId != null and taskId != ''">
, taskId=#{taskId}
</if>
WHERE sid = #{sid}
</update>
</mapper> </mapper>

7
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaform/OaFormService.java

@ -7,6 +7,7 @@ import com.yxt.anrui.oa.biz.oahireapply.OaHireApplyDetailsVo;
import com.yxt.anrui.oa.biz.oaleaveapply.OaLeaveApply; import com.yxt.anrui.oa.biz.oaleaveapply.OaLeaveApply;
import com.yxt.anrui.oa.biz.oaleaveapply.OaLeaveApplyQuery; import com.yxt.anrui.oa.biz.oaleaveapply.OaLeaveApplyQuery;
import com.yxt.anrui.oa.biz.oaleaveapply.OaLeaveApplyVo; import com.yxt.anrui.oa.biz.oaleaveapply.OaLeaveApplyVo;
import com.yxt.anrui.oa.feign.flowable.flow.UpdateFlowFieldVo;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.StringUtils; import com.yxt.common.base.utils.StringUtils;
@ -16,6 +17,8 @@ import com.yxt.common.core.vo.PagerVo;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Map;
/** /**
* @description: * @description:
* @author: dimengzhe * @author: dimengzhe
@ -62,4 +65,8 @@ public class OaFormService extends MybatisBaseService<OaFormMapper, OaForm> {
delBySids(sids); delBySids(sids);
return rb.success(); return rb.success();
} }
public int updateFlow(Map<String, Object> map) {
return baseMapper.updateFlowFiled(map);
}
} }

2
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oahiredetails/OaHireDetailsMapper.java

@ -32,8 +32,6 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetails;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsVo;
import java.util.List; import java.util.List;

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oahiredetails/OaHireDetailsMapper.xml

@ -3,11 +3,11 @@
<mapper namespace="com.yxt.anrui.oa.biz.oahiredetails.OaHireDetailsMapper"> <mapper namespace="com.yxt.anrui.oa.biz.oahiredetails.OaHireDetailsMapper">
<!-- <where> ${ew.sqlSegment} </where>--> <!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} --> <!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsVo"> <select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.oahiredetails.OaHireDetailsVo">
SELECT * FROM oa_hire_details <where> ${ew.sqlSegment} </where> SELECT * FROM oa_hire_details <where> ${ew.sqlSegment} </where>
</select> </select>
<select id="selectListAllVo" resultType="com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsVo"> <select id="selectListAllVo" resultType="com.yxt.anrui.oa.biz.oahiredetails.OaHireDetailsVo">
SELECT * FROM oa_hire_details <where> ${ew.sqlSegment} </where> SELECT * FROM oa_hire_details <where> ${ew.sqlSegment} </where>
</select> </select>
</mapper> </mapper>

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oahiredetails/OaHireDetailsService.java

@ -34,12 +34,6 @@ import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetails;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsQuery;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsVo;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsDetailsVo;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsDto;
import com.yxt.anrui.oa.api.oahiredetails.OaHireDetailsFeign;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

42
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/OaMendApply.java

@ -25,14 +25,18 @@
*********************************************************/ *********************************************************/
package com.yxt.anrui.oa.biz.oamendapply; package com.yxt.anrui.oa.biz.oamendapply;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.anrui.oa.biz.oaform.OaForm; import com.yxt.anrui.oa.biz.oaform.OaForm;
import com.yxt.common.core.domain.BaseEntity; import com.yxt.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date; import java.util.Date;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient;
/** /**
* Project: yxt-oa(补卡申请) <br/> * Project: yxt-oa(补卡申请) <br/>
@ -50,35 +54,41 @@ import lombok.Data;
@Data @Data
@ApiModel(value = "补卡申请", description = "补卡申请") @ApiModel(value = "补卡申请", description = "补卡申请")
@TableName("oa_mend_apply") @TableName("oa_mend_apply")
public class OaMendApply extends OaForm { public class OaMendApply extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String formSid; private String formSid;
@ApiModelProperty("单据编号") @ApiModelProperty("补卡时间")
private String billNo; // 单据编号 private String time;
@TableField(exist = false)
private OaForm oaForm = new OaForm();
/* @ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("申请人") @ApiModelProperty("申请人")
private String createByName; // 申请人 private String createByName;
@ApiModelProperty("申请部门sid") @ApiModelProperty("申请部门sid")
private String deptSid; // 申请部门sid private String deptSid;
@ApiModelProperty("申请部门名称") @ApiModelProperty("申请部门名称")
private String deptName; // 申请部门名称 private String deptName;
@ApiModelProperty("补卡时间")
private String time; // 补卡时间
@ApiModelProperty("分公司sid") @ApiModelProperty("分公司sid")
private String useOrgSid; // 分公司sid private String useOrgSid;
@ApiModelProperty("分公司名称") @ApiModelProperty("分公司名称")
private String useOrgName; // 分公司名称 private String useOrgName;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("办结日期") @ApiModelProperty("办结日期")
private Date finishTime; // 办结日期 private Date finishTime;
@ApiModelProperty("实例id") @ApiModelProperty("实例id")
private String procInstId; // 实例id private String procInstId;
@ApiModelProperty("流程定义id") @ApiModelProperty("流程定义id")
private String procDefId; // 流程定义id private String procDefId;
@ApiModelProperty("任务id") @ApiModelProperty("任务id")
private String taskId; // 任务id private String taskId;
@ApiModelProperty("环节id") @ApiModelProperty("环节id")
private String nodeId; // 环节id private String nodeId;
@ApiModelProperty("流程状态") @ApiModelProperty("流程状态")
private String nodeState; // 流程状态 private String nodeState;*/
} }

38
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/OaMendApplyDto.java

@ -55,39 +55,41 @@ import lombok.Data;
@ApiModel(value = "补卡申请 数据传输对象", description = "补卡申请 数据传输对象") @ApiModel(value = "补卡申请 数据传输对象", description = "补卡申请 数据传输对象")
public class OaMendApplyDto implements Dto { public class OaMendApplyDto implements Dto {
private String sid; // sid private static final long serialVersionUID = -4536006302677264298L;
private String userSid; private String sid;
private String createBySid;
private String orgPath; private String orgPath;
@ApiModelProperty("补卡原因") @ApiModelProperty("补卡原因")
private String remarks; private String remarks;
@ApiModelProperty("单据编号") @ApiModelProperty("补卡时间")
private String time;
@ApiModelProperty("图片")
private List<String> files = new ArrayList<>();
/* @ApiModelProperty("单据编号")
private String billNo; // 单据编号 private String billNo; // 单据编号
@ApiModelProperty("申请人") @ApiModelProperty("申请人")
private String createByName; // 申请人 private String createByName;
@ApiModelProperty("申请部门sid") @ApiModelProperty("申请部门sid")
private String deptSid; // 申请部门sid private String deptSid;
@ApiModelProperty("申请部门名称") @ApiModelProperty("申请部门名称")
private String deptName; // 申请部门名称 private String deptName;
@ApiModelProperty("补卡时间")
private String time; // 补卡时间
@ApiModelProperty("分公司sid") @ApiModelProperty("分公司sid")
private String useOrgSid; // 分公司sid private String useOrgSid;
@ApiModelProperty("分公司名称") @ApiModelProperty("分公司名称")
private String useOrgName; // 分公司名称 private String useOrgName;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("办结日期") @ApiModelProperty("办结日期")
private Date finishTime; private Date finishTime;
@ApiModelProperty("实例id") @ApiModelProperty("实例id")
private String procInstId; // 实例id private String procInstId;
@ApiModelProperty("流程定义id") @ApiModelProperty("流程定义id")
private String procDefId; // 流程定义id private String procDefId;
@ApiModelProperty("任务id") @ApiModelProperty("任务id")
private String taskId; // 任务id private String taskId;
@ApiModelProperty("环节id") @ApiModelProperty("环节id")
private String nodeId; // 环节id private String nodeId;
@ApiModelProperty("流程状态") @ApiModelProperty("流程状态")
private String nodeState; // 流程状态 private String nodeState;*/
@ApiModelProperty("图片")
private List<String> files = new ArrayList<>();
} }

204
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/OaMendApplyService.java

@ -33,6 +33,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendix; import com.yxt.anrui.oa.biz.oaappendix.OaAppendix;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.biz.oaform.OaForm;
import com.yxt.anrui.oa.biz.oaform.OaFormDto;
import com.yxt.anrui.oa.biz.oaform.OaFormService;
import com.yxt.anrui.oa.biz.oamendapply.flowable.*; import com.yxt.anrui.oa.biz.oamendapply.flowable.*;
import com.yxt.anrui.oa.feign.base.Rule; import com.yxt.anrui.oa.feign.base.Rule;
import com.yxt.anrui.oa.feign.file.OaFileEnum; import com.yxt.anrui.oa.feign.file.OaFileEnum;
@ -63,7 +66,9 @@ import com.yxt.common.core.vo.PagerVo;
import org.apache.tomcat.util.threads.ThreadPoolExecutor; import org.apache.tomcat.util.threads.ThreadPoolExecutor;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.concurrent.*; import java.util.concurrent.*;
@ -90,6 +95,8 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
private FileUploadComponent fileUploadComponent; private FileUploadComponent fileUploadComponent;
@Autowired @Autowired
private OaAppendixService oaAppendixService; private OaAppendixService oaAppendixService;
@Autowired
private OaFormService oaFormService;
public PagerVo<OaMendApplyVo> listPageVo(PagerQuery<OaMendApplyQuery> pq) { public PagerVo<OaMendApplyVo> listPageVo(PagerQuery<OaMendApplyQuery> pq) {
OaMendApplyQuery query = pq.getParams(); OaMendApplyQuery query = pq.getParams();
@ -100,7 +107,7 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
return p; return p;
} }
public String saveOrUpdateDto(OaMendApplyDto dto){ /* public String saveOrUpdateDtoOld(OaMendApplyDto dto) {
String dtoSid = dto.getSid(); String dtoSid = dto.getSid();
List<String> files = dto.getFiles(); List<String> files = dto.getFiles();
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData(); String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
@ -150,29 +157,96 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
} }
this.updateByDto(dto); this.updateByDto(dto);
return dtoSid; return dtoSid;
} }*/
@Transactional
public ResultBean<String> saveOrUpdateDto(OaMendApplyDto dto) {
ResultBean<String> rb = ResultBean.fireFail();
String sid = dto.getSid();
List<String> files = dto.getFiles();
public String insertByDto(OaMendApplyDto dto){ if (StringUtils.isBlank(sid)) {
// 新建操作
OaMendApply entity = new OaMendApply(); OaMendApply entity = new OaMendApply();
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "sid");
entity.setNodeState("待提交"); String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
entity.setCreateBySid(dto.getUserSid()); SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(dto.getUserSid()).getData(); String deptName = "";
entity.setCreateByName(sysUserVo.getName()); String deptSid = "";
baseMapper.insert(entity); List<String> split = Arrays.asList(dto.getOrgPath().split("/"));
return entity.getSid();
if (split.size() > 1) {
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(split.size() - 2)).getData();
SysOrganizationVo sysOrganization1 = sysOrganizationFeign.fetchBySid(split.get(split.size() - 1)).getData();
deptName = sysOrganization1.getName();
deptSid = sysOrganization1.getSid();
} else {
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(0)).getData();
deptName = sysOrganization.getName();
deptSid = sysOrganization.getSid();
}
// 生成单据编号
String billNo = "QJSQ" + useOrgSid + DateUtil.format(DateUtil.date(), "yyyyMM");
String i = baseMapper.selectNum(billNo);
if (StringUtils.isNotBlank(i)) {
billNo = Rule.getBillNo(billNo, Integer.valueOf(i).intValue());
} else {
billNo = Rule.getBillNo(billNo, 0);
} }
public void updateByDto(OaMendApplyDto dto){ OaForm oaForm = entity.getOaForm();
String dtoSid = dto.getSid(); BeanUtil.copyProperties(dto, oaForm, "sid", "remarks");
if (StringUtils.isBlank(dtoSid)) { oaForm.setUseOrgSid(useOrgSid);
return; oaForm.setUseOrgName(organizationVo.getName());
oaForm.setDeptSid(deptSid);
oaForm.setDeptName(deptName);
oaForm.setBillNo(billNo);
// 获取用户信息
SysUserVo sysUserVo = sysUserFeign.fetchBySid(dto.getCreateBySid()).getData();
oaForm.setCreateByName(sysUserVo.getName());
OaFormDto oaFormDto = new OaFormDto();
BeanUtil.copyProperties(oaForm, oaFormDto, "sid");
ResultBean<String> resultBean = oaFormService.saveOrUpdateForm(oaFormDto);
if (!resultBean.getSuccess()) {
return rb;
} }
OaMendApply entity = fetchBySid(dtoSid);
entity.setFormSid(resultBean.getData());
baseMapper.insert(entity);
// 处理附件
saveFiles(sid, files);
sid = entity.getSid();
} else {
// 更新操作
OaMendApply entity = fetchBySid(sid);
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity); baseMapper.updateById(entity);
} }
return rb.success().setData(sid);
}
// 保存文件
private void saveFiles(String sid, List<String> files) {
if (files == null || files.isEmpty()) {
return; // 如果没有文件,不做任何操作
}
oaAppendixService.deleteByLinkSid(sid);
for (String file : files) {
String filePath = file.replace(fileUploadComponent.getUrlPrefix(), "");
OaAppendix oaAppendix = new OaAppendix();
oaAppendix.setLinkSid(sid);
oaAppendix.setAttachType(OaFileEnum.OAMENDAPPLY.getAttachType());
oaAppendix.setFilePath(filePath);
oaAppendixService.save(oaAppendix);
}
}
public OaMendApplyDetailsVo fetchDetailsVoBySid(String sid) { public OaMendApplyDetailsVo fetchDetailsVoBySid(String sid) {
OaMendApply entity = fetchBySid(sid); OaMendApply entity = fetchBySid(sid);
OaMendApplyDetailsVo vo = new OaMendApplyDetailsVo(); OaMendApplyDetailsVo vo = new OaMendApplyDetailsVo();
@ -198,14 +272,16 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
return rb.setMsg("操作失败!提交的数据不一致"); return rb.setMsg("操作失败!提交的数据不一致");
} }
//新增修改保存 //新增修改保存
String businessSid = saveOrUpdateDto(dto); String businessSid = saveOrUpdateDto(dto).getData();
oaMendApply = fetchBySid(businessSid); oaMendApply = fetchBySid(businessSid);
OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
//创建BusinessVariables实体对象 //创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables(); BusinessVariables bv = new BusinessVariables();
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。 //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
//用户的部门全路径sid //用户的部门全路径sid
SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(oaMendApply.getDeptSid()).getData(); SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(oaMendApply.getOaForm().getDeptSid()).getData();
bv.setOrgSidPath(deptVo.getOrgSidPath()); bv.setOrgSidPath(deptVo.getOrgSidPath());
//业务sid //业务sid
bv.setBusinessSid(businessSid); bv.setBusinessSid(businessSid);
@ -220,15 +296,24 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
//流程定义id //流程定义id
bv.setModelId(ProcDefEnum.OAMENDAPPLY.getProDefId()); bv.setModelId(ProcDefEnum.OAMENDAPPLY.getProDefId());
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaMendApply.getDeptSid()).getData(); SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaMendApply.getOaForm().getDeptSid()).getData();
if(StringUtils.isBlank(organizationVo.getManagerSid())){
return rb.setMsg("请先设置该部门的主管人员");
}
bv.setNextNodeUserSids(organizationVo.getManagerSid()); bv.setNextNodeUserSids(organizationVo.getManagerSid());
bv.setFormVariables(variables); bv.setFormVariables(variables);
if (r == 1) { if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv); ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv);
UpdateFlowFieldVo ufVo = voResultBean.getData(); UpdateFlowFieldVo ufVo = voResultBean.getData();
updateFlowFiled(BeanUtil.beanToMap(ufVo)); // updateFlowFiled(BeanUtil.beanToMap(ufVo));
//更新oaform中的流程数据
ufVo.setSid(oaMendApply.getFormSid());
oaFormService.updateFlow(BeanUtil.beanToMap(ufVo));
//极光推送 //极光推送
oaMendApply = fetchBySid(businessSid); oaMendApply = fetchBySid(businessSid);
oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
//==================================添加线程 //==================================添加线程
try { try {
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
@ -237,6 +322,8 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
0L, TimeUnit.MILLISECONDS, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
OaMendApply mendApply = oaMendApply; OaMendApply mendApply = oaMendApply;
oaForm = oaFormService.fetchBySid(mendApply.getFormSid());
mendApply.setOaForm(oaForm);
Future future1 = pool.submit(() -> { Future future1 = pool.submit(() -> {
//极光推送 //极光推送
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
@ -246,7 +333,7 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
messageFlowableQuery.setAppMap(appMap); messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(businessSid); messageFlowableQuery.setBusinessSid(businessSid);
messageFlowableQuery.setModuleName("补卡申请"); messageFlowableQuery.setModuleName("补卡申请");
messageFlowableQuery.setMsgContent(mendApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); messageFlowableQuery.setMsgContent(mendApply.getOaForm().getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("补卡申请"); messageFlowableQuery.setMsgTitle("补卡申请");
messageFeign.pushMessage(messageFlowableQuery); messageFeign.pushMessage(messageFlowableQuery);
}); });
@ -261,8 +348,8 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
if (StringUtils.isBlank(dto.getInstanceId())) { if (StringUtils.isBlank(dto.getInstanceId())) {
return rb.setMsg("参数错误:instanceId"); return rb.setMsg("参数错误:instanceId");
} }
bv.setTaskId(oaMendApply.getTaskId()); bv.setTaskId(oaMendApply.getOaForm().getTaskId());
bv.setTaskDefKey(oaMendApply.getNodeId()); bv.setTaskDefKey(oaMendApply.getOaForm().getNodeId());
bv.setComment(StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交"); bv.setComment(StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交");
bv.setInstanceId(dto.getInstanceId()); bv.setInstanceId(dto.getInstanceId());
return complete(bv); return complete(bv);
@ -276,7 +363,9 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
r = 1; r = 1;
} else { } else {
if (oaMendApply != null) { if (oaMendApply != null) {
String businessTaskId = oaMendApply.getTaskId(); OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
String businessTaskId = oaMendApply.getOaForm().getTaskId();
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) {
//新提交 //新提交
r = 1; r = 1;
@ -300,6 +389,8 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
String businessSid = bv.getBusinessSid(); String businessSid = bv.getBusinessSid();
OaMendApply oaMendApply = fetchBySid(businessSid); OaMendApply oaMendApply = fetchBySid(businessSid);
OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
Map<String, Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
//网关 //网关
@ -308,16 +399,19 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
variables.put("app", appMap); variables.put("app", appMap);
//======================================= //=======================================
bv.setFormVariables(variables); bv.setFormVariables(variables);
SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(oaMendApply.getDeptSid()).getData(); SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(oaMendApply.getOaForm().getDeptSid()).getData();
bv.setOrgSidPath(deptVo.getOrgSidPath()); bv.setOrgSidPath(deptVo.getOrgSidPath());
bv.setModelId(oaMendApply.getProcDefId()); bv.setModelId(oaMendApply.getOaForm().getProcDefId());
if (bv.getTaskId().equals(oaMendApply.getTaskId())) { if (bv.getTaskId().equals(oaMendApply.getOaForm().getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv); ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
if (!resultBean.getSuccess()) { if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
UpdateFlowFieldVo ufVo = resultBean.getData(); UpdateFlowFieldVo ufVo = resultBean.getData();
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); // updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
//更新oaform中的流程数据
ufVo.setSid(oaMendApply.getFormSid());
oaFormService.updateFlow(BeanUtil.beanToMap(ufVo));
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { if ("Event_end".equals(resultBean.getData().getTaskDefKey())) {
} else { } else {
@ -331,18 +425,20 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
0L, TimeUnit.MILLISECONDS, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
OaMendApply mendApply = oaMendApply; OaMendApply mendApply = oaMendApply;
oaForm = oaFormService.fetchBySid(mendApply.getFormSid());
mendApply.setOaForm(oaForm);
Future future1 = pool.submit(() -> { Future future1 = pool.submit(() -> {
//极光推送 //极光推送
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo(); MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo, messageFlowVo); BeanUtil.copyProperties(ufVo, messageFlowVo);
ufVo.setProcDefId(mendApply.getProcDefId()); ufVo.setProcDefId(mendApply.getOaForm().getProcDefId());
ufVo.setProcInsId(mendApply.getProcInstId()); ufVo.setProcInsId(mendApply.getOaForm().getProcInstId());
messageFlowableQuery.setUfVo(messageFlowVo); messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap); messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(businessSid); messageFlowableQuery.setBusinessSid(businessSid);
messageFlowableQuery.setModuleName("补卡申请"); messageFlowableQuery.setModuleName("补卡申请");
messageFlowableQuery.setMsgContent(mendApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); messageFlowableQuery.setMsgContent(mendApply.getOaForm().getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("补卡申请"); messageFlowableQuery.setMsgTitle("补卡申请");
messageFeign.pushMessage(messageFlowableQuery); messageFeign.pushMessage(messageFlowableQuery);
}); });
@ -365,9 +461,11 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
Map<String, Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
//查询业务信息 //查询业务信息
OaMendApply oaMendApply = fetchBySid(query.getBusinessSid()); OaMendApply oaMendApply = fetchBySid(query.getBusinessSid());
OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
//网关 //网关
bv.setModelId(oaMendApply.getProcDefId()); bv.setModelId(oaMendApply.getOaForm().getProcDefId());
bv.setFormVariables(variables); bv.setFormVariables(variables);
//======================================= //=======================================
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
@ -384,9 +482,11 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
Map<String, Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
//查询业务信息 //查询业务信息
OaMendApply oaMendApply = fetchBySid(query.getBusinessSid()); OaMendApply oaMendApply = fetchBySid(query.getBusinessSid());
OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
//网关 //网关
bv.setModelId(oaMendApply.getProcDefId()); bv.setModelId(oaMendApply.getOaForm().getProcDefId());
bv.setFormVariables(variables); bv.setFormVariables(variables);
//======================================= //=======================================
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
@ -402,7 +502,9 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
if (oaMendApply == null) { if (oaMendApply == null) {
return rb.setMsg("该申请不存在"); return rb.setMsg("该申请不存在");
} }
String businessTaskId = oaMendApply.getTaskId(); OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
String businessTaskId = oaMendApply.getOaForm().getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) { if (StringUtils.isNotBlank(businessTaskId)) {
if (businessTaskId.equals(query.getTaskId())) { if (businessTaskId.equals(query.getTaskId())) {
if (StringUtils.isBlank(query.getComment())) { if (StringUtils.isBlank(query.getComment())) {
@ -427,7 +529,10 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
UpdateFlowFieldVo ufVo = resultBean.getData(); UpdateFlowFieldVo ufVo = resultBean.getData();
Map<String, Object> map = BeanUtil.beanToMap(ufVo); Map<String, Object> map = BeanUtil.beanToMap(ufVo);
//更新业务中的流程相关的参数 //更新业务中的流程相关的参数
updateFlowFiled(map); // updateFlowFiled(map);
//更新oaform中的流程数据
ufVo.setSid(oaMendApply.getFormSid());
oaFormService.updateFlow(BeanUtil.beanToMap(ufVo));
//极光推送 //极光推送
oaMendApply = fetchBySid(businessSid); oaMendApply = fetchBySid(businessSid);
//==================================添加线程 //==================================添加线程
@ -438,14 +543,16 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
0L, TimeUnit.MILLISECONDS, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
OaMendApply mendApply = oaMendApply; OaMendApply mendApply = oaMendApply;
oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
mendApply.setOaForm(oaForm);
Future future1 = pool.submit(() -> { Future future1 = pool.submit(() -> {
//极光推送 //极光推送
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo(); MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo, messageFlowVo); BeanUtil.copyProperties(ufVo, messageFlowVo);
String procId = mendApply.getProcInstId(); String procId = mendApply.getOaForm().getProcInstId();
ufVo.setProcInsId(procId); ufVo.setProcInsId(procId);
ufVo.setProcDefId(mendApply.getProcDefId()); ufVo.setProcDefId(mendApply.getOaForm().getProcDefId());
messageFlowableQuery.setUfVo(messageFlowVo); messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap); messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(businessSid); messageFlowableQuery.setBusinessSid(businessSid);
@ -456,7 +563,7 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(mendApply.getCreateBySid())) { if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(mendApply.getCreateBySid())) {
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交");
} else { } else {
messageFlowableQuery.setMsgContent(mendApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); messageFlowableQuery.setMsgContent(mendApply.getOaForm().getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
} }
messageFlowableQuery.setMsgTitle("补卡申请"); messageFlowableQuery.setMsgTitle("补卡申请");
messageFeign.pushMessage(messageFlowableQuery); messageFeign.pushMessage(messageFlowableQuery);
@ -477,7 +584,9 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
return rb.setMsg("参数错误:userSid"); return rb.setMsg("参数错误:userSid");
} }
OaMendApply oaMendApply = fetchBySid(query.getBusinessSid()); OaMendApply oaMendApply = fetchBySid(query.getBusinessSid());
String businessTaskId = oaMendApply.getTaskId(); OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
String businessTaskId = oaMendApply.getOaForm().getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) { if (StringUtils.isNotBlank(businessTaskId)) {
if (businessTaskId.equals(query.getTaskId())) { if (businessTaskId.equals(query.getTaskId())) {
FlowTaskVo flowTaskVo = new FlowTaskVo(); FlowTaskVo flowTaskVo = new FlowTaskVo();
@ -486,7 +595,10 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
if (!resultBean.getSuccess()) { if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); // updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
//更新oaform中的流程数据
resultBean.getData().setSid(oaMendApply.getFormSid());
oaFormService.updateFlow(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData()); return rb.success().setData(resultBean.getData());
} }
} }
@ -505,7 +617,9 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
return rb.setMsg("请填写意见"); return rb.setMsg("请填写意见");
} }
OaMendApply oaMendApply = fetchBySid(query.getBusinessSid()); OaMendApply oaMendApply = fetchBySid(query.getBusinessSid());
String businessTaskId = oaMendApply.getTaskId(); OaForm oaForm = oaFormService.fetchBySid(oaMendApply.getFormSid());
oaMendApply.setOaForm(oaForm);
String businessTaskId = oaMendApply.getOaForm().getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) { if (StringUtils.isNotBlank(businessTaskId)) {
if (query.getUserSid().equals(oaMendApply.getCreateBySid())) { if (query.getUserSid().equals(oaMendApply.getCreateBySid())) {
FlowTaskVo flowTaskVo = new FlowTaskVo(); FlowTaskVo flowTaskVo = new FlowTaskVo();
@ -515,7 +629,10 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map); // updateFlowFiled(map);
//更新oaform中的流程数据
resultBean.getData().setSid(oaMendApply.getFormSid());
oaFormService.updateFlow(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData()); return rb.success().setData(resultBean.getData());
} else { } else {
if (businessTaskId.equals(query.getTaskId())) { if (businessTaskId.equals(query.getTaskId())) {
@ -526,7 +643,10 @@ public class OaMendApplyService extends MybatisBaseService<OaMendApplyMapper, Oa
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map); // updateFlowFiled(map);
//更新oaform中的流程数据
resultBean.getData().setSid(oaMendApply.getFormSid());
oaFormService.updateFlow(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData()); return rb.success().setData(resultBean.getData());
} }
} }

1
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oamendapply/flowable/SubmitOaMendApplyDto.java

@ -16,6 +16,7 @@ import lombok.Data;
@Data @Data
public class SubmitOaMendApplyDto extends OaMendApplyDto { public class SubmitOaMendApplyDto extends OaMendApplyDto {
private static final long serialVersionUID = 8607710587497609779L;
@ApiModelProperty("意见") @ApiModelProperty("意见")
private String comment; private String comment;
@ApiModelProperty("流程实例id") @ApiModelProperty("流程实例id")

Loading…
Cancel
Save