Browse Source

流程bug处理

master
qqkj 5 years ago
parent
commit
4aa026e578
  1. 1
      xm-bootstrap/src/main/java/com/xm/AutoConfig.java
  2. 2
      xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java
  3. 20
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml
  4. 2
      xm-core/src/test/java/com/xm/AutoConfig.java

1
xm-bootstrap/src/main/java/com/xm/AutoConfig.java

@ -10,7 +10,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
* 一些默认公共配置 * 一些默认公共配置
*/ */
@ComponentScan(basePackages={"com.mdp"}) @ComponentScan(basePackages={"com.mdp"})
@EnableAsync
@Configuration @Configuration
public class AutoConfig { public class AutoConfig {
} }

2
xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java

@ -268,7 +268,7 @@ public class XmTaskExecuserService extends BaseService {
if("6".equals(xmTaskExecuserDB.getSettleStatus())) { if("6".equals(xmTaskExecuserDB.getSettleStatus())) {
throw new BizException(xmTaskExecuser.getUsername()+"已经结算完毕,不能再申请"); throw new BizException(xmTaskExecuser.getUsername()+"已经结算完毕,不能再申请");
} }
if(!"0".equals(xmTaskExecuserDB.getSettleStatus()) && !"1".equals(xmTaskExecuserDB.getSettleStatus()) && !"5".equals(xmTaskExecuserDB.getSettleStatus())) {
if( !StringUtils.hasText(xmTaskExecuserDB.getSettleStatus()) && !"0".equals(xmTaskExecuserDB.getSettleStatus()) && !"1".equals(xmTaskExecuserDB.getSettleStatus()) && !"5".equals(xmTaskExecuserDB.getSettleStatus())) {
throw new BizException(xmTaskExecuser.getUsername()+"暂时还不能申请结算"); throw new BizException(xmTaskExecuser.getUsername()+"暂时还不能申请结算");
} }
BigDecimal settleAmount=NumberUtil.getBigDecimal(xmTaskExecuser.getSettleAmount(), BigDecimal.ZERO); BigDecimal settleAmount=NumberUtil.getBigDecimal(xmTaskExecuser.getSettleAmount(), BigDecimal.ZERO);

20
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml

@ -105,16 +105,28 @@
group by res.project_id,res.userid,res.username,subject_id,subject_name,biz_month group by res.project_id,res.userid,res.username,subject_id,subject_name,biz_month
</select> </select>
<select id="listSumForSettleGroupByTaskIdAndUserid" parameterType="HashMap" resultType="HashMap"> <select id="listSumForSettleGroupByTaskIdAndUserid" parameterType="HashMap" resultType="HashMap">
select res.project_id,res.task_id,res.userid,res.username,sum(res.act_cost_amount) as act_cost_amount,max(t.budget_cost) as task_budget_cost,max(t.project_name) as project_name
from XM.xm_task t left join XM.xm_project_m_cost_user res on res.task_id=t.id and res.project_id=res.project_id
SELECT
res.project_id,
res.task_id,
res.userid,
max( res.username ) as username,
sum( res.act_cost_amount ) AS act_cost_amount,
max( t.budget_cost ) AS task_budget_cost,
max( t.project_name ) AS project_name
FROM XM.xm_task t
LEFT JOIN
XM.xm_project_m_cost_user res ON res.task_id = t.id AND res.project_id = t.project_id
<where> <where>
and t.project_id=#{projectId}
t.project_id=#{projectId}
<if test="subjectId != null and subjectId !='' "> and res.subject_id =#{subjectId} </if> <if test="subjectId != null and subjectId !='' "> and res.subject_id =#{subjectId} </if>
<if test="costType != null and costType !='' "> and res.cost_type =#{costType} </if> <if test="costType != null and costType !='' "> and res.cost_type =#{costType} </if>
<if test="taskId != null and taskId !='' "> and res.task_id =#{taskId} </if> <if test="taskId != null and taskId !='' "> and res.task_id =#{taskId} </if>
<if test="userid != null and userid !='' "> and res.userid =#{userid} </if> <if test="userid != null and userid !='' "> and res.userid =#{userid} </if>
</where> </where>
group by res.project_id,res.task_id,res.userid,res.username
GROUP BY
res.project_id,
res.task_id,
res.userid
</select> </select>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->

2
xm-core/src/test/java/com/xm/AutoConfig.java

@ -2,6 +2,7 @@ package com.xm;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
/** /**
* 要使用mdp平台功能必须 扫码com.mdp包 * 要使用mdp平台功能必须 扫码com.mdp包
@ -9,5 +10,6 @@ import org.springframework.context.annotation.Configuration;
*/ */
@ComponentScan(basePackages={"com.mdp"}) @ComponentScan(basePackages={"com.mdp"})
@Configuration @Configuration
@EnableAsync
public class AutoConfig { public class AutoConfig {
} }
Loading…
Cancel
Save