Commit c780ecf3 authored by Ken you's avatar Ken you

update 报表审批流程 ---Ken

parent 02721594
......@@ -73,7 +73,24 @@ public final class Constant {
public static final String APPROVAL_DISAGREED="disagreed";
public static final String ASSIGNEE_MANAGER="manager";
public static final String ASSIGNEE_TAX_BP="tax_bp";
public static final String ASSIGNEE_COMPLIANCE_IA="compliance_ia";
public static final String ASSIGNEE_COMPLIANCE_CHIEF ="compliance_chief";
public static final String ASSIGNEE_ACCOUNTANT="accountant";
//中文角色名
public static final String ROLE_ACCOUNTANT="会计";
public static final String ROLE_COMPLIANCE_CHIEF="合规负责人";
public static final String ROLE_TAX_BP="税务BP";
public static final String ROLE_COMPLIANCE_IA="合规IA";
public static final String[] APPROVAL_ROLEAll={
ROLE_ACCOUNTANT,
ROLE_COMPLIANCE_CHIEF,
ROLE_TAX_BP,
ROLE_COMPLIANCE_IA};
public static final String[] APPROVAL_ROLE2={
ROLE_TAX_BP,
ROLE_COMPLIANCE_IA};
public static class DataSourceName {
public static final String KeyValueDataSource = "KeyValueDataSource";
......
......@@ -53,9 +53,9 @@ public class ApprovalController {
}
@ResponseBody
@RequestMapping(value = "/tasks/{assignee}")
public List<ApprovalTaskInfo> data(@PathVariable String assignee) {//accountant manager
return approvalService.getTask();
@RequestMapping(value = "/tasks/{assignee}/{year}/{month}")
public List<ApprovalTaskInfo> data(@PathVariable String assignee,@PathVariable Integer year,@PathVariable Integer month) {//accountant manager
return approvalService.getTask(year,month);
}
@ResponseBody
......@@ -65,11 +65,18 @@ public class ApprovalController {
}
// @ApiOperation(value = "审批报表")
/**
* 同机构的不同角色不会有相同的用户
* @param projectId
* @param period
* @param decide
* @param comment
*/
@ResponseBody
@RequestMapping(value = "/check/{projectId}/{period}",method = RequestMethod.PUT)
@Secured("vatApproval:check")
public void check(@PathVariable String projectId,@PathVariable Integer period, @RequestParam String decide, @RequestParam String comment) {//only for manager role
approvalService.checkTask(projectId, period, decide,comment);
approvalService.checkTask(projectId, period, decide,comment,"");
}
@ResponseBody
......
......@@ -1067,7 +1067,5 @@ public class UserServiceImpl extends AbstractService {
logger.error(String.format("导出用户信息异常:%s",e.getMessage()));
}
return null;
}
}
This diff is collapsed.
package pwc.taxtech.atms.service.impl;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.dto.approval.ApprovalDto;
import pwc.taxtech.atms.vat.service.impl.ApprovalService;
public class BpmTest extends CommonIT {
private static final Logger logger = LoggerFactory.getLogger(BpmTest.class);
@Autowired
RuntimeService runtimeService;
@Autowired
TaskService taskService;
@Autowired
ApprovalService approvalService;
@Test
public void testStart(){
ApprovalDto dto=new ApprovalDto();
dto.setProjectId("220c976c-f527-4abe-ad4a-3c2f863854c8");
dto.setPeriodDate("2019.2");
approvalService.startInstanceAndAssignee(dto);
// approvalService.checkTask("220c976c-f527-4abe-ad4a-3c2f863854c8",2,"agreed","aaa", Constant.ROLE_COMPLIANCE_CHIEF);
// approvalService.checkTask("220c976c-f527-4abe-ad4a-3c2f863854c8",2,"agreed","aaa", Constant.ROLE_TAX_BP);
// approvalService.checkTask("220c976c-f527-4abe-ad4a-3c2f863854c8",2,"agreed","aaa", Constant.ROLE_COMPLIANCE_IA);
}
@Test
public void testApproval(){
ApprovalDto dto=new ApprovalDto();
dto.setProjectId("220c976c-f527-4abe-ad4a-3c2f863854c8");
dto.setPeriodDate("2019.2");
// approvalService.checkTask("220c976c-f527-4abe-ad4a-3c2f863854c8",2,"disagreed","aaa", Constant.ROLE_COMPLIANCE_IA);
}
}
\ No newline at end of file
This diff is collapsed.
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
......@@ -10,6 +9,8 @@ import pwc.taxtech.atms.vat.dpo.ApprovalTaskInfo;
import pwc.taxtech.atms.vat.entity.PeriodApprove;
import pwc.taxtech.atms.vat.entity.PeriodApproveExample;
import java.util.List;
@Mapper
public interface PeriodApproveMapper extends MyVatMapper {
/**
......@@ -129,8 +130,11 @@ public interface PeriodApproveMapper extends MyVatMapper {
" INNER JOIN project p ON pa.project_id = p.ID " +
" JOIN user u1 ON pa.create_by = u1.id " +
" LEFT JOIN user u2 ON pa.approval_by = u2.id " +
"WHERE 1=1 <if test=\"year != 0\"> AND pa.YEAR = #{year,jdbcType=DECIMAL} </if>" +
"<if test=\"month != 0\"> AND pa.PERIOD = #{month,jdbcType=DECIMAL} </if>" +
" order by pa.create_time desc "+
"</script>")
List<ApprovalTaskInfo> queryApprovalList();
List<ApprovalTaskInfo> queryApprovalList(@Param("year") Integer year, @Param("month") Integer month);
@Select("" +
"SELECT " +
......@@ -142,7 +146,7 @@ public interface PeriodApproveMapper extends MyVatMapper {
String getStatusByProjectIdAndPeriod(@Param("projectId") String projectId, @Param("period") Integer period);
@Select("" +
"SELECT " +
"SELECT p.id AS id ," +
" p.instance_id AS instanceId ,p.status AS status " +
"FROM " +
" ( SELECT * FROM period_approve WHERE project_id = #{projectId} AND period = #{period} ORDER BY create_time DESC ) p " +
......
package pwc.taxtech.atms.vat.dpo;
import java.sql.Date;
import java.util.List;
public class ApprovalTaskInfo {
private String organizationId;
......@@ -17,6 +18,16 @@ public class ApprovalTaskInfo {
private String reportPaths;
private String reportIds;
private String templateIds;
//详细流程
private List<ApprovalTaskNodeInfo> items;
public List<ApprovalTaskNodeInfo> getItems() {
return items;
}
public void setItems(List<ApprovalTaskNodeInfo> items) {
this.items = items;
}
public String getProjectName() {
return projectName;
......
package pwc.taxtech.atms.vat.dpo;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
public class ApprovalTaskNodeInfo {
private String userId;
private String userName;
private String comment;
@JsonFormat(pattern="yyyy-MM-dd HH:ss:mm",timezone="GMT+8")
private Date startTime;
private String role;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
@Override
public String toString() {
return "ApprovalTaskNodeInfo{" +
"userId='" + userId + '\'' +
", userName='" + userName + '\'' +
", comment='" + comment + '\'' +
", startTime=" + startTime +
", role='" + role + '\'' +
'}';
}
}
......@@ -92,7 +92,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, PROJECT_ID, PERIOD, REPORT_IDS, REPORT_PATHS, "STATUS", INSTANCE_ID, "YEAR",
ID, PROJECT_ID, PERIOD, REPORT_IDS, REPORT_PATHS, STATUS, INSTANCE_ID, YEAR,
TEMPLATE_IDS, CREATE_BY, CREATE_TIME, APPROVAL_BY, APPROVAL_TIME, APPROVAL_RESUALT
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultMap="BaseResultMap">
......@@ -105,7 +105,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from PERIOD_APPROVE
from period_approve
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -120,7 +120,7 @@
-->
select
<include refid="Base_Column_List" />
from PERIOD_APPROVE
from period_approve
where ID = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
......@@ -128,7 +128,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from PERIOD_APPROVE
delete from period_approve
where ID = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample">
......@@ -136,7 +136,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from PERIOD_APPROVE
delete from period_approve
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -146,9 +146,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into PERIOD_APPROVE (ID, PROJECT_ID, PERIOD,
REPORT_IDS, REPORT_PATHS, "STATUS",
INSTANCE_ID, "YEAR", TEMPLATE_IDS,
insert into period_approve (ID, PROJECT_ID, PERIOD,
REPORT_IDS, REPORT_PATHS, STATUS,
INSTANCE_ID, YEAR, TEMPLATE_IDS,
CREATE_BY, CREATE_TIME, APPROVAL_BY,
APPROVAL_TIME, APPROVAL_RESUALT)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL},
......@@ -162,7 +162,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into PERIOD_APPROVE
insert into period_approve
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
......@@ -180,13 +180,13 @@
REPORT_PATHS,
</if>
<if test="status != null">
"STATUS",
STATUS,
</if>
<if test="instanceId != null">
INSTANCE_ID,
</if>
<if test="year != null">
"YEAR",
YEAR,
</if>
<if test="templateIds != null">
TEMPLATE_IDS,
......@@ -257,7 +257,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from PERIOD_APPROVE
select count(*) from period_approve
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -267,7 +267,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
update period_approve
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=VARCHAR},
......@@ -285,13 +285,13 @@
REPORT_PATHS = #{record.reportPaths,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
"STATUS" = #{record.status,jdbcType=VARCHAR},
STATUS = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.instanceId != null">
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
</if>
<if test="record.year != null">
"YEAR" = #{record.year,jdbcType=DECIMAL},
YEAR = #{record.year,jdbcType=DECIMAL},
</if>
<if test="record.templateIds != null">
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
......@@ -321,15 +321,15 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
update period_approve
set ID = #{record.id,jdbcType=VARCHAR},
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
PERIOD = #{record.period,jdbcType=DECIMAL},
REPORT_IDS = #{record.reportIds,jdbcType=VARCHAR},
REPORT_PATHS = #{record.reportPaths,jdbcType=VARCHAR},
"STATUS" = #{record.status,jdbcType=VARCHAR},
STATUS = #{record.status,jdbcType=VARCHAR},
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
"YEAR" = #{record.year,jdbcType=DECIMAL},
YEAR = #{record.year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
......@@ -345,7 +345,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
update period_approve
<set>
<if test="projectId != null">
PROJECT_ID = #{projectId,jdbcType=VARCHAR},
......@@ -360,13 +360,13 @@
REPORT_PATHS = #{reportPaths,jdbcType=VARCHAR},
</if>
<if test="status != null">
"STATUS" = #{status,jdbcType=VARCHAR},
STATUS = #{status,jdbcType=VARCHAR},
</if>
<if test="instanceId != null">
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
</if>
<if test="year != null">
"YEAR" = #{year,jdbcType=DECIMAL},
YEAR = #{year,jdbcType=DECIMAL},
</if>
<if test="templateIds != null">
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
......@@ -394,14 +394,14 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
update period_approve
set PROJECT_ID = #{projectId,jdbcType=VARCHAR},
PERIOD = #{period,jdbcType=DECIMAL},
REPORT_IDS = #{reportIds,jdbcType=VARCHAR},
REPORT_PATHS = #{reportPaths,jdbcType=VARCHAR},
"STATUS" = #{status,jdbcType=VARCHAR},
STATUS = #{status,jdbcType=VARCHAR},
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
"YEAR" = #{year,jdbcType=DECIMAL},
YEAR = #{year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
CREATE_BY = #{createBy,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
......@@ -420,7 +420,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from PERIOD_APPROVE
from period_approve
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......
......@@ -850,6 +850,20 @@
"TBEBITForm":"TB EBIT Form",
"ClickEnsureTip": "Click Ensure Button!",
"ApproveCommitted":"Committed",
"ApproveAgreed":"Agreed",
"ApproveDisAgreed":"Disagreed",
"ApproveProjectName":"Project Name",
"ApprovePeriod":"Period",
"ApproveCommiteUser":"Commite User",
"ApproveUser":"Approve User",
"ApproveStatus":"Status",
"ApproveComment":"Approve Comment",
"ApproveStratTime":"Strat Time",
"ApproveEndTime":"Approved Time",
"ApproveTaskList":"Approve Task List",
"ApproveRole":"Approve Role",
"ConditionColumnNum": "Search Condition Column Num",
"Condition": "Search Condition",
"RevenueTypeConfiguration":"Revenue Type Config"
......
......@@ -905,7 +905,19 @@
"MenuBrazilianTax": "巴西税务分析",
"MenuOtherCountries": "其他国家税务分析",
"ApproveCommitted":"审核中",
"ApproveAgreed":"通过",
"ApproveDisAgreed":"驳回",
"ApproveProjectName":"项目名称",
"ApprovePeriod":"期间",
"ApproveCommiteUser":"提审人",
"ApproveUser":"审批人",
"ApproveStatus":"提审状态",
"ApproveComment":"审批意见",
"ApproveStratTime":"提审时间",
"ApproveEndTime":"审批时间",
"ApproveTaskList":"审批列表",
"ApproveRole":"审批角色",
"true": "是",
"false": "否",
......
......@@ -5,6 +5,10 @@
return $http.get('url', apiConfig.createVat());
},
startApproveDeploy : function() {
return $http.post('/approval/deploy', apiConfig.createVat());
},
commitNewApproval: function (param) {
return $http.post('/approval/commit',{
projectId: param.projectId,
......@@ -12,9 +16,9 @@
}, apiConfig.createVat());
},
approvalTasks: function () {
approvalTasks: function (year, month) {
var assignee='accountant';
return $http.get('/approval/tasks/'+assignee, apiConfig.createVat());
return $http.get('/approval/tasks/'+assignee+"/"+year+"/"+month, apiConfig.createVat());
},
getApprovalTemplateInfo:function(templateId){
......
......@@ -43,22 +43,23 @@
</div>
<div class="new-right-header">
<div class="head-row">
<span class="total-projects">报表审批</span>
<span class="total-projects">{{'MenuListApproval' | translate}}</span>
</div>
<div class="project-staus">
<span style="padding-right: 10px;" class="result-style">{{projectMsg}}</span>
<span style="padding-right:10px;">提审中</span><span class="num-style">{{ongoingNum}}</span>
<span style="padding-right:10px;padding-left:20px;">通过</span><span
class="num-style">{{notBeginNum}}</span>
<span style="padding-right:10px;padding-left:20px;">驳回</span><span
<span style="padding-right:10px;">{{'ApproveCommitted' | translate}}</span><span class="num-style">{{ongoingNum}}</span>
<span style="padding-right:10px;padding-left:20px;">{{'ApproveAgreed' | translate}}</span><span
class="num-style">{{completedNum}}</span>
<span style="padding-right:10px;padding-left:20px;">{{'ApproveDisAgreed' | translate}}</span><span
class="num-style">{{notBeginNum}}</span>
</div>
<div class="task-list">
<span class="taskMsg" ng-show="serviceTypeId !=='12'">审批列表</span>
<span class="taskMsg" ng-show="serviceTypeId !=='12'">{{'ApproveTaskList' | translate}}</span>
</div>
</div>
<div class="new-right-body">
<div class="right-header">
<button style="display: none; " ng-click="startApprove()">start </button>
<div class="overview-picker">
<input type="text" id="overviewDatepicker" class="datepicker vat-subheader" style="width:120px;"
readonly="readonly"/>
......@@ -66,12 +67,10 @@
</div>
<span class="clear"></span>
</div>
<div class="vat-preview-input-invoice" id="mainPreviewDiv">
<div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" id="grid" dx-data-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span
translate="NoDataAvailable"></span>
</div>
<div id ="approveGridContainer" dx-data-grid="gridOptions" dx-item-alias="approval">
<div data-options="dxTemplate: {name: 'detail'}">
<div class="internal-grid-container">
<div dx-data-grid="gridOptions.detailGridOptions(approval.data)"></div>
</div>
</div>
</div>
......
#approveGridContainer {
height: 420px;
margin-left: 20px;
margin-right: 50px;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment