From 69f4bef166439577631ee3c4fadebfbeb9485d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 22 Feb 2022 15:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8A=82=E7=82=B9=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E3=80=81=E6=A0=87=E7=AD=BE=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xm/core/entity/XmMenuPlan.java | 9 ++- .../java/com/xm/core/entity/XmMenuState.java | 33 +++++---- .../mapper/xm/core/dao/XmMenuPlanMapper.xml | 67 +++++++++--------- .../mapper/xm/core/dao/XmMenuStateMapper.xml | 68 ++++++++++--------- 4 files changed, 90 insertions(+), 87 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/entity/XmMenuPlan.java b/xm-core/src/main/java/com/xm/core/entity/XmMenuPlan.java index 5e7a8f7a..c24e114a 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmMenuPlan.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmMenuPlan.java @@ -1,16 +1,15 @@ -package com.xm.core.entity; +package com.xm.core.entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; - -import java.math.BigDecimal; import java.util.Date; +import java.math.BigDecimal; /** - * 组织 com.qqkj 顶级模块 xm 大模块 core 小模块
+ * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmMenuPlan所有属性名:
* projectId,id,projectName,menuId,planStartTime,planEndTime,actStartTime,actEndTime,planWorkload,actWorkload,planCostAmount,actCostAmount,finishRate,demandRate,designRate,devRate,uatRate,sitRate,onlineStatus,onlineTime,planStatus,chargeUserid,chargeUsername,menuStatus,ctime,ltime,cuserid,cusername,calcTime,menuName,planWorkhours,planWorkerCnt,closedBugs,activeBugs,confirmedBugs,resolvedBugs,testCases,execCases,designCases,finishCases,iterationCnt,taskCnt,finishTaskCnt,productId,productName,bugCnt;
- * 表 XM.xm_menu_plan 功能计划表,无需前端维护,所有数据由汇总统计得出的所有字段名:
+ * 表 xm_menu_plan 功能计划表,无需前端维护,所有数据由汇总统计得出的所有字段名:
* project_id,id,project_name,menu_id,plan_start_time,plan_end_time,act_start_time,act_end_time,plan_workload,act_workload,plan_cost_amount,act_cost_amount,finish_rate,demand_rate,design_rate,dev_rate,uat_rate,sit_rate,online_status,online_time,plan_status,charge_userid,charge_username,menu_status,ctime,ltime,cuserid,cusername,calc_time,menu_name,plan_workhours,plan_worker_cnt,closed_bugs,active_bugs,confirmed_bugs,resolved_bugs,test_cases,exec_cases,design_cases,finish_cases,iteration_cnt,task_cnt,finish_task_cnt,product_id,product_name,bug_cnt;
* 当前主键(包括多主键):
* id;
diff --git a/xm-core/src/main/java/com/xm/core/entity/XmMenuState.java b/xm-core/src/main/java/com/xm/core/entity/XmMenuState.java index 56dbc401..198977c6 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmMenuState.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmMenuState.java @@ -1,16 +1,15 @@ -package com.xm.core.entity; +package com.xm.core.entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; - -import java.math.BigDecimal; import java.util.Date; +import java.math.BigDecimal; /** - * 组织 com.qqkj 顶级模块 xm 大模块 core 小模块
+ * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmMenuState所有属性名:
* id,menuId,planStartTime,planEndTime,actStartTime,actEndTime,planWorkload,actWorkload,planCostAmount,actCostAmount,finishRate,demandRate,designRate,devRate,uatRate,sitRate,onlineStatus,onlineTime,planStatus,chargeUserid,chargeUsername,menuStatus,ctime,ltime,cuserid,cusername,calcTime,menuName,planWorkhours,planWorkerCnt,closedBugs,activeBugs,confirmedBugs,resolvedBugs,productId,productName,testCases,execCases,designCases,finishCases,projectCnt,iterationCnt,taskCnt,finishTaskCnt,bizDate,bugCnt;
- * 表 XM.xm_menu_state 功能状态表,无需前端维护,所有数据由汇总统计得出的所有字段名:
+ * 表 xm_menu_state 功能状态表,无需前端维护,所有数据由汇总统计得出的所有字段名:
* id,menu_id,plan_start_time,plan_end_time,act_start_time,act_end_time,plan_workload,act_workload,plan_cost_amount,act_cost_amount,finish_rate,demand_rate,design_rate,dev_rate,uat_rate,sit_rate,online_status,online_time,plan_status,charge_userid,charge_username,menu_status,ctime,ltime,cuserid,cusername,calc_time,menu_name,plan_workhours,plan_worker_cnt,closed_bugs,active_bugs,confirmed_bugs,resolved_bugs,product_id,product_name,test_cases,exec_cases,design_cases,finish_cases,project_cnt,iteration_cnt,task_cnt,finish_task_cnt,biz_date,bug_cnt;
* 当前主键(包括多主键):
* id;
@@ -112,16 +111,16 @@ public class XmMenuState implements java.io.Serializable { BigDecimal planWorkerCnt; @ApiModelProperty(notes="总关闭bugs",allowEmptyValue=true,example="",allowableValues="") - Integer closedBugs; + BigDecimal closedBugs; @ApiModelProperty(notes="激活bugs",allowEmptyValue=true,example="",allowableValues="") - Integer activeBugs; + BigDecimal activeBugs; @ApiModelProperty(notes="已确认bugs总数",allowEmptyValue=true,example="",allowableValues="") - Integer confirmedBugs; + BigDecimal confirmedBugs; @ApiModelProperty(notes="已解决bugs总数",allowEmptyValue=true,example="",allowableValues="") - Integer resolvedBugs; + BigDecimal resolvedBugs; @ApiModelProperty(notes="产品编号",allowEmptyValue=true,example="",allowableValues="") String productId; @@ -351,25 +350,25 @@ public class XmMenuState implements java.io.Serializable { /** * 总关闭bugs **/ - public void setClosedBugs(Integer closedBugs) { + public void setClosedBugs(BigDecimal closedBugs) { this.closedBugs = closedBugs; } /** * 激活bugs **/ - public void setActiveBugs(Integer activeBugs) { + public void setActiveBugs(BigDecimal activeBugs) { this.activeBugs = activeBugs; } /** * 已确认bugs总数 **/ - public void setConfirmedBugs(Integer confirmedBugs) { + public void setConfirmedBugs(BigDecimal confirmedBugs) { this.confirmedBugs = confirmedBugs; } /** * 已解决bugs总数 **/ - public void setResolvedBugs(Integer resolvedBugs) { + public void setResolvedBugs(BigDecimal resolvedBugs) { this.resolvedBugs = resolvedBugs; } /** @@ -628,25 +627,25 @@ public class XmMenuState implements java.io.Serializable { /** * 总关闭bugs **/ - public Integer getClosedBugs() { + public BigDecimal getClosedBugs() { return this.closedBugs; } /** * 激活bugs **/ - public Integer getActiveBugs() { + public BigDecimal getActiveBugs() { return this.activeBugs; } /** * 已确认bugs总数 **/ - public Integer getConfirmedBugs() { + public BigDecimal getConfirmedBugs() { return this.confirmedBugs; } /** * 已解决bugs总数 **/ - public Integer getResolvedBugs() { + public BigDecimal getResolvedBugs() { return this.resolvedBugs; } /** diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuPlanMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuPlanMapper.xml index 36f84d38..f8d90419 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuPlanMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuPlanMapper.xml @@ -3,13 +3,21 @@ - - - - + + + + and (res.id) in + + ( #{item}) + + + + + - {call load_tasks_to_xm_menu_plan(#{projectId,mode=IN})} + {call load_tasks_to_xm_menu_plan(#{projectId,mode=IN})} + @@ -17,15 +25,9 @@ @@ -58,7 +60,7 @@ - + insert into xm_menu_plan( ) values ( @@ -76,13 +78,13 @@ - delete from xm_menu_plan + delete from xm_menu_plan where id = #{id} - update xm_menu_plan + update xm_menu_plan @@ -91,7 +93,7 @@ - update xm_menu_plan + update xm_menu_plan @@ -106,7 +108,7 @@ - update xm_menu_plan + update xm_menu_plan set where id = #{item.id} @@ -114,11 +116,12 @@ - delete from xm_menu_plan - where id in - - #{item.id } - + delete from xm_menu_plan + where + (id) in + + ( #{item.id} ) + @@ -126,17 +129,17 @@ project_id,id,project_name,menu_id,plan_start_time,plan_end_time,act_start_time,act_end_time,plan_workload,act_workload,plan_cost_amount,act_cost_amount,finish_rate,demand_rate,design_rate,dev_rate,uat_rate,sit_rate,online_status,online_time,plan_status,charge_userid,charge_username,menu_status,ctime,ltime,cuserid,cusername,calc_time,menu_name,plan_workhours,plan_worker_cnt,closed_bugs,active_bugs,confirmed_bugs,resolved_bugs,test_cases,exec_cases,design_cases,finish_cases,iteration_cnt,task_cnt,finish_task_cnt,product_id,product_name,bug_cnt - + and res.project_id = #{projectId} and res.id = #{id} and res.project_name = #{projectName} and res.menu_id = #{menuId} - and TO_CHAR(res.plan_start_time,'YYYY-MM-DD') = TO_CHAR(#{planStartTime},'YYYY-MM-DD') - and TO_CHAR(res.plan_end_time,'YYYY-MM-DD') = TO_CHAR(#{planEndTime},'YYYY-MM-DD') - and TO_CHAR(res.act_start_time,'YYYY-MM-DD') = TO_CHAR(#{actStartTime},'YYYY-MM-DD') - and TO_CHAR(res.act_end_time,'YYYY-MM-DD') = TO_CHAR(#{actEndTime},'YYYY-MM-DD') + and date_format(res.plan_start_time,'%Y-%m-%d') = date_format(#{planStartTime},'%Y-%m-%d') + and date_format(res.plan_end_time,'%Y-%m-%d') = date_format(#{planEndTime},'%Y-%m-%d') + and date_format(res.act_start_time,'%Y-%m-%d') = date_format(#{actStartTime},'%Y-%m-%d') + and date_format(res.act_end_time,'%Y-%m-%d') = date_format(#{actEndTime},'%Y-%m-%d') and res.plan_workload = #{planWorkload} and res.act_workload = #{actWorkload} and res.plan_cost_amount = #{planCostAmount} @@ -148,16 +151,16 @@ and res.uat_rate = #{uatRate} and res.sit_rate = #{sitRate} and res.online_status = #{onlineStatus} - and TO_CHAR(res.online_time,'YYYY-MM-DD') = TO_CHAR(#{onlineTime},'YYYY-MM-DD') + and date_format(res.online_time,'%Y-%m-%d') = date_format(#{onlineTime},'%Y-%m-%d') and res.plan_status = #{planStatus} and res.charge_userid = #{chargeUserid} and res.charge_username = #{chargeUsername} and res.menu_status = #{menuStatus} - and TO_CHAR(res.ctime,'YYYY-MM-DD') = TO_CHAR(#{ctime},'YYYY-MM-DD') - and TO_CHAR(res.ltime,'YYYY-MM-DD') = TO_CHAR(#{ltime},'YYYY-MM-DD') + and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') + and date_format(res.ltime,'%Y-%m-%d') = date_format(#{ltime},'%Y-%m-%d') and res.cuserid = #{cuserid} and res.cusername = #{cusername} - and TO_CHAR(res.calc_time,'YYYY-MM-DD') = TO_CHAR(#{calcTime},'YYYY-MM-DD') + and date_format(res.calc_time,'%Y-%m-%d') = date_format(#{calcTime},'%Y-%m-%d') and res.menu_name = #{menuName} and res.plan_workhours = #{planWorkhours} and res.plan_worker_cnt = #{planWorkerCnt} diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuStateMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuStateMapper.xml index 8aad7227..17a934d2 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuStateMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuStateMapper.xml @@ -3,14 +3,21 @@ - - - - + + + + and (res.id) in + + ( #{item}) + + + + + - {call load_tasks_to_xm_menu_state(#{productId,mode=IN})} + {call load_tasks_to_xm_menu_state(#{productId,mode=IN})} - + @@ -18,15 +25,9 @@ @@ -59,7 +60,7 @@ - + insert into xm_menu_state( ) values ( @@ -77,13 +78,13 @@ - delete from xm_menu_state + delete from xm_menu_state where id = #{id} - update xm_menu_state + update xm_menu_state @@ -92,7 +93,7 @@ - update xm_menu_state + update xm_menu_state @@ -107,7 +108,7 @@ - update xm_menu_state + update xm_menu_state set where id = #{item.id} @@ -115,11 +116,12 @@ - delete from xm_menu_state - where id in - - #{item.id } - + delete from xm_menu_state + where + (id) in + + ( #{item.id} ) + @@ -127,15 +129,15 @@ id,menu_id,plan_start_time,plan_end_time,act_start_time,act_end_time,plan_workload,act_workload,plan_cost_amount,act_cost_amount,finish_rate,demand_rate,design_rate,dev_rate,uat_rate,sit_rate,online_status,online_time,plan_status,charge_userid,charge_username,menu_status,ctime,ltime,cuserid,cusername,calc_time,menu_name,plan_workhours,plan_worker_cnt,closed_bugs,active_bugs,confirmed_bugs,resolved_bugs,product_id,product_name,test_cases,exec_cases,design_cases,finish_cases,project_cnt,iteration_cnt,task_cnt,finish_task_cnt,biz_date,bug_cnt - + and res.id = #{id} and res.menu_id = #{menuId} - and TO_CHAR(res.plan_start_time,'YYYY-MM-DD') = TO_CHAR(#{planStartTime},'YYYY-MM-DD') - and TO_CHAR(res.plan_end_time,'YYYY-MM-DD') = TO_CHAR(#{planEndTime},'YYYY-MM-DD') - and TO_CHAR(res.act_start_time,'YYYY-MM-DD') = TO_CHAR(#{actStartTime},'YYYY-MM-DD') - and TO_CHAR(res.act_end_time,'YYYY-MM-DD') = TO_CHAR(#{actEndTime},'YYYY-MM-DD') + and date_format(res.plan_start_time,'%Y-%m-%d') = date_format(#{planStartTime},'%Y-%m-%d') + and date_format(res.plan_end_time,'%Y-%m-%d') = date_format(#{planEndTime},'%Y-%m-%d') + and date_format(res.act_start_time,'%Y-%m-%d') = date_format(#{actStartTime},'%Y-%m-%d') + and date_format(res.act_end_time,'%Y-%m-%d') = date_format(#{actEndTime},'%Y-%m-%d') and res.plan_workload = #{planWorkload} and res.act_workload = #{actWorkload} and res.plan_cost_amount = #{planCostAmount} @@ -147,16 +149,16 @@ and res.uat_rate = #{uatRate} and res.sit_rate = #{sitRate} and res.online_status = #{onlineStatus} - and TO_CHAR(res.online_time,'YYYY-MM-DD') = TO_CHAR(#{onlineTime},'YYYY-MM-DD') + and date_format(res.online_time,'%Y-%m-%d') = date_format(#{onlineTime},'%Y-%m-%d') and res.plan_status = #{planStatus} and res.charge_userid = #{chargeUserid} and res.charge_username = #{chargeUsername} and res.menu_status = #{menuStatus} - and TO_CHAR(res.ctime,'YYYY-MM-DD') = TO_CHAR(#{ctime},'YYYY-MM-DD') - and TO_CHAR(res.ltime,'YYYY-MM-DD') = TO_CHAR(#{ltime},'YYYY-MM-DD') + and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') + and date_format(res.ltime,'%Y-%m-%d') = date_format(#{ltime},'%Y-%m-%d') and res.cuserid = #{cuserid} and res.cusername = #{cusername} - and TO_CHAR(res.calc_time,'YYYY-MM-DD') = TO_CHAR(#{calcTime},'YYYY-MM-DD') + and date_format(res.calc_time,'%Y-%m-%d') = date_format(#{calcTime},'%Y-%m-%d') and res.menu_name = #{menuName} and res.plan_workhours = #{planWorkhours} and res.plan_worker_cnt = #{planWorkerCnt}