Browse Source

重构工时系统

master
陈裕财 4 years ago
parent
commit
7b27ffb234
  1. 30
      xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java
  2. 44
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml

30
xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java

@ -9,7 +9,7 @@ import java.math.BigDecimal;
/** /**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> * 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmTaskWorkload所有属性名: <br> * 实体 XmTaskWorkload所有属性名: <br>
* "userid","员工编号","username","姓名","ctime","创建日期","taskId","业务对象主键任务编号","cuserid","创建人编号","bizDate","业务日期yyyy-MM-dd","wstatus","状态0-待确认,1-已确认,2-无效","remark","备注","ttype","任务类型-关联字典taskType","id","主键","stime","结算提交时间","sstatus","结算状态0-无需结算,1-待结算2-已提交3-已通过4-已结算","workload","工时,一个task_id可多次提交,小时","rworkload","剩余工时(同一天取最后日期更新到task表budget_workload中)","cusername","创建人姓名","projectId","归属项目","branchId","项目归属机构","ubranchId","用户归属机构","sbillId","结算单编号","sbillName","结算单名称","samt","结算工时对应结算金额-根据结算方案计算结算金额","sworkload","结算工时,用于结算,默认=workload","taskOut","是否外购0否1是","crowd","是否众包","feeRemark","费用说明","subjectId","费用科目编号","subjectName","费用科目名称","sschemel","任务结算方案,来自task表、来自数字字典xmTaskSettleSchemel","uniPrice","工时单价,来自task表,根据task_out判断取内部还是外部单价";<br>
* "userid","员工编号","username","姓名","ctime","创建日期","taskId","业务对象主键任务编号","cuserid","创建人编号","bizDate","业务日期yyyy-MM-dd","wstatus","状态0-待确认,1-已确认,2-无效","remark","备注","ttype","任务类型-关联字典taskType","id","主键","stime","结算提交时间","sstatus","结算状态0-无需结算,1-待结算2-已提交3-已通过4-已结算","workload","工时,一个task_id可多次提交,小时","rworkload","剩余工时(同一天取最后日期更新到task表budget_workload中)","cusername","创建人姓名","projectId","归属项目","branchId","项目归属机构","ubranchId","用户归属机构","sbillId","结算单编号","sbillName","结算单名称","detailId","结算单明细表id";<br>
* 当前主键(包括多主键):<br> * 当前主键(包括多主键):<br>
* id;<br> * id;<br>
*/ */
@ -80,32 +80,8 @@ public class XmTaskWorkload implements java.io.Serializable {
@ApiModelProperty(notes="结算单名称",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="结算单名称",allowEmptyValue=true,example="",allowableValues="")
String sbillName; String sbillName;
@ApiModelProperty(notes="结算工时对应结算金额-根据结算方案计算结算金额",allowEmptyValue=true,example="",allowableValues="")
BigDecimal samt;
@ApiModelProperty(notes="结算工时,用于结算,默认=workload",allowEmptyValue=true,example="",allowableValues="")
BigDecimal sworkload;
@ApiModelProperty(notes="是否外购0否1是",allowEmptyValue=true,example="",allowableValues="")
String taskOut;
@ApiModelProperty(notes="是否众包",allowEmptyValue=true,example="",allowableValues="")
String crowd;
@ApiModelProperty(notes="费用说明",allowEmptyValue=true,example="",allowableValues="")
String feeRemark;
@ApiModelProperty(notes="费用科目编号",allowEmptyValue=true,example="",allowableValues="")
String subjectId;
@ApiModelProperty(notes="费用科目名称",allowEmptyValue=true,example="",allowableValues="")
String subjectName;
@ApiModelProperty(notes="任务结算方案,来自task表、来自数字字典xmTaskSettleSchemel",allowEmptyValue=true,example="",allowableValues="")
String sschemel;
@ApiModelProperty(notes="工时单价,来自task表,根据task_out判断取内部还是外部单价",allowEmptyValue=true,example="",allowableValues="")
BigDecimal uniPrice;
@ApiModelProperty(notes="结算单明细表id",allowEmptyValue=true,example="",allowableValues="")
String detailId;
/** /**
*主键 *主键

44
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml

@ -284,7 +284,7 @@
insert into xm_task_workload( insert into xm_task_workload(
<include refid="columns"/> <include refid="columns"/>
) values ( ) values (
#{userid},#{username},#{ctime},#{taskId},#{cuserid},#{bizDate},#{wstatus},#{remark},#{ttype},#{id},#{stime},#{sstatus},#{workload},#{rworkload},#{cusername},#{projectId},#{branchId},#{ubranchId},#{sbillId},#{sbillName},#{samt},#{sworkload},#{taskOut},#{crowd},#{feeRemark},#{subjectId},#{subjectName},#{sschemel},#{uniPrice}
#{userid},#{username},#{ctime},#{taskId},#{cuserid},#{bizDate},#{wstatus},#{remark},#{ttype},#{id},#{stime},#{sstatus},#{workload},#{rworkload},#{cusername},#{projectId},#{branchId},#{ubranchId},#{sbillId},#{sbillName},#{detailId}
) )
</insert> </insert>
@ -359,7 +359,7 @@
<!--sql片段 列--> <!--sql片段 列-->
<sql id="columns"> <sql id="columns">
userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,stime,sstatus,workload,rworkload,cusername,project_id,branch_id,ubranch_id,sbill_id,sbill_name,samt,sworkload,task_out,crowd,fee_remark,subject_id,subject_name,sschemel,uni_price
userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,stime,sstatus,workload,rworkload,cusername,project_id,branch_id,ubranch_id,sbill_id,sbill_name,detail_id
</sql> </sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> <!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
@ -384,15 +384,7 @@
<if test="ubranchId != null and ubranchId != ''"> and res.ubranch_id = #{ubranchId} </if> <if test="ubranchId != null and ubranchId != ''"> and res.ubranch_id = #{ubranchId} </if>
<if test="sbillId != null and sbillId != ''"> and res.sbill_id = #{sbillId} </if> <if test="sbillId != null and sbillId != ''"> and res.sbill_id = #{sbillId} </if>
<if test="sbillName != null and sbillName != ''"> and res.sbill_name = #{sbillName} </if> <if test="sbillName != null and sbillName != ''"> and res.sbill_name = #{sbillName} </if>
<if test="samt != null and samt != ''"> and res.samt = #{samt} </if>
<if test="sworkload != null and sworkload != ''"> and res.sworkload = #{sworkload} </if>
<if test="taskOut != null and taskOut != ''"> and res.task_out = #{taskOut} </if>
<if test="crowd != null and crowd != ''"> and res.crowd = #{crowd} </if>
<if test="feeRemark != null and feeRemark != ''"> and res.fee_remark = #{feeRemark} </if>
<if test="subjectId != null and subjectId != ''"> and res.subject_id = #{subjectId} </if>
<if test="subjectName != null and subjectName != ''"> and res.subject_name = #{subjectName} </if>
<if test="sschemel != null and sschemel != ''"> and res.sschemel = #{sschemel} </if>
<if test="uniPrice != null and uniPrice != ''"> and res.uni_price = #{uniPrice} </if>
<if test="detailId != null and detailId != ''"> and res.detail_id = #{detailId} </if>
</sql> </sql>
<!--sql片段 更新字段 --> <!--sql片段 更新字段 -->
<sql id="set"> <sql id="set">
@ -415,15 +407,7 @@
ubranch_id = #{ubranchId}, ubranch_id = #{ubranchId},
sbill_id = #{sbillId}, sbill_id = #{sbillId},
sbill_name = #{sbillName}, sbill_name = #{sbillName},
samt = #{samt},
sworkload = #{sworkload},
task_out = #{taskOut},
crowd = #{crowd},
fee_remark = #{feeRemark},
subject_id = #{subjectId},
subject_name = #{subjectName},
sschemel = #{sschemel},
uni_price = #{uniPrice}
detail_id = #{detailId}
</sql> </sql>
<sql id="someFieldSet"> <sql id="someFieldSet">
<if test="userid != null and userid != ''"> userid = #{userid}, </if> <if test="userid != null and userid != ''"> userid = #{userid}, </if>
@ -445,15 +429,7 @@
<if test="ubranchId != null and ubranchId != ''"> ubranch_id = #{ubranchId}, </if> <if test="ubranchId != null and ubranchId != ''"> ubranch_id = #{ubranchId}, </if>
<if test="sbillId != null and sbillId != ''"> sbill_id = #{sbillId}, </if> <if test="sbillId != null and sbillId != ''"> sbill_id = #{sbillId}, </if>
<if test="sbillName != null and sbillName != ''"> sbill_name = #{sbillName}, </if> <if test="sbillName != null and sbillName != ''"> sbill_name = #{sbillName}, </if>
<if test="samt != null and samt != ''"> samt = #{samt}, </if>
<if test="sworkload != null and sworkload != ''"> sworkload = #{sworkload}, </if>
<if test="taskOut != null and taskOut != ''"> task_out = #{taskOut}, </if>
<if test="crowd != null and crowd != ''"> crowd = #{crowd}, </if>
<if test="feeRemark != null and feeRemark != ''"> fee_remark = #{feeRemark}, </if>
<if test="subjectId != null and subjectId != ''"> subject_id = #{subjectId}, </if>
<if test="subjectName != null and subjectName != ''"> subject_name = #{subjectName}, </if>
<if test="sschemel != null and sschemel != ''"> sschemel = #{sschemel}, </if>
<if test="uniPrice != null and uniPrice != ''"> uni_price = #{uniPrice}, </if>
<if test="detailId != null and detailId != ''"> detail_id = #{detailId}, </if>
</sql> </sql>
<!--sql片段 批量更新 --> <!--sql片段 批量更新 -->
<sql id="batchSet"> <sql id="batchSet">
@ -476,14 +452,6 @@
ubranch_id = #{item.ubranchId}, ubranch_id = #{item.ubranchId},
sbill_id = #{item.sbillId}, sbill_id = #{item.sbillId},
sbill_name = #{item.sbillName}, sbill_name = #{item.sbillName},
samt = #{item.samt},
sworkload = #{item.sworkload},
task_out = #{item.taskOut},
crowd = #{item.crowd},
fee_remark = #{item.feeRemark},
subject_id = #{item.subjectId},
subject_name = #{item.subjectName},
sschemel = #{item.sschemel},
uni_price = #{item.uniPrice}
detail_id = #{item.detailId}
</sql> </sql>
</mapper> </mapper>
Loading…
Cancel
Save