diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillDetailController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillDetailController.java new file mode 100644 index 00000000..e24ef1ba --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillDetailController.java @@ -0,0 +1,295 @@ +package com.xm.core.ctrl; + +import java.util.*; +import java.util.stream.Collectors; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +import static com.mdp.core.utils.ResponseHelper.*; +import static com.mdp.core.utils.BaseUtils.*; +import com.mdp.core.entity.Tips; +import com.mdp.core.err.BizException; +import com.mdp.mybatis.PageUtils; +import com.mdp.core.utils.RequestUtils; +import com.mdp.core.utils.NumberUtil; +import com.mdp.safe.client.entity.User; +import com.mdp.safe.client.utils.LoginUtils; + +import com.xm.core.service.XmTaskSbillDetailService; +import com.xm.core.entity.XmTaskSbillDetail; + +/** + * url编制采用rest风格,如对xm_task_sbill_detail 工时登记表的操作有增删改查,对应的url分别为:
+ * 新增: core/xmTaskSbillDetail/add
+ * 查询: core/xmTaskSbillDetail/list
+ * 模糊查询: core/xmTaskSbillDetail/listKey
+ * 修改: core/xmTaskSbillDetail/edit
+ * 删除: core/xmTaskSbillDetail/del
+ * 批量删除: core/xmTaskSbillDetail/batchDel
+ * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskSbillDetail 表 xm_task_sbill_detail 当前主键(包括多主键): id; + ***/ +@RestController("xm.core.xmTaskSbillDetailController") +@RequestMapping(value="/**/core/xmTaskSbillDetail") +@Api(tags={"工时登记表操作接口"}) +public class XmTaskSbillDetailController { + + static Logger logger =LoggerFactory.getLogger(XmTaskSbillDetailController.class); + + @Autowired + private XmTaskSbillDetailService xmTaskSbillDetailService; + + + Map fieldsMap = toMap(new XmTaskSbillDetail()); + + + @ApiOperation( value = "查询工时登记表信息列表",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskSbillDetail.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") + }) + @RequestMapping(value="/list",method=RequestMethod.GET) + public Map listXmTaskSbillDetail( @RequestParam Map xmTaskSbillDetail){ + Map m = new HashMap<>(); + Tips tips=new Tips("查询成功"); + RequestUtils.transformArray(xmTaskSbillDetail, "ids"); + PageUtils.startPage(xmTaskSbillDetail); + List> xmTaskSbillDetailList = xmTaskSbillDetailService.selectListMapByWhere(xmTaskSbillDetail); //列出XmTaskSbillDetail列表 + PageUtils.responePage(m, xmTaskSbillDetailList); + m.put("data",xmTaskSbillDetailList); + + m.put("tips", tips); + return m; + } + + + + /** + @ApiOperation( value = "新增一条工时登记表信息",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskSbillDetail.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/add",method=RequestMethod.POST) + public Map addXmTaskSbillDetail(@RequestBody XmTaskSbillDetail xmTaskSbillDetail) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功新增一条数据"); + try{ + boolean createPk=false; + if(!StringUtils.hasText(xmTaskSbillDetail.getId())) { + createPk=true; + xmTaskSbillDetail.setId(xmTaskSbillDetailService.createKey("id")); + } + if(createPk==false){ + if(xmTaskSbillDetailService.selectOneObject(xmTaskSbillDetail) !=null ){ + return failed("pk-exists","编号重复,请修改编号再提交"); + } + } + xmTaskSbillDetailService.insert(xmTaskSbillDetail); + m.put("data",xmTaskSbillDetail); + }catch (BizException e) { + tips=e.getTips(); + logger.error("",e); + }catch (Exception e) { + tips.setFailureMsg(e.getMessage()); + logger.error("",e); + } + m.put("tips", tips); + return m; + } + */ + + /** + @ApiOperation( value = "删除一条工时登记表信息",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") + }) + @RequestMapping(value="/del",method=RequestMethod.POST) + public Map delXmTaskSbillDetail(@RequestBody XmTaskSbillDetail xmTaskSbillDetail){ + Map m = new HashMap<>(); + Tips tips=new Tips("成功删除一条数据"); + try{ + if(!StringUtils.hasText(xmTaskSbillDetail.getId())) { + return failed("pk-not-exists","请上送主键参数id"); + } + XmTaskSbillDetail xmTaskSbillDetailDb = xmTaskSbillDetailService.selectOneObject(xmTaskSbillDetail); + if( xmTaskSbillDetailDb == null ){ + return failed("data-not-exists","数据不存在,无法删除"); + } + xmTaskSbillDetailService.deleteByPk(xmTaskSbillDetail); + }catch (BizException e) { + tips=e.getTips(); + logger.error("",e); + }catch (Exception e) { + tips.setFailureMsg(e.getMessage()); + logger.error("",e); + } + m.put("tips", tips); + return m; + } + */ + + /** + @ApiOperation( value = "根据主键修改一条工时登记表信息",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskSbillDetail.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/edit",method=RequestMethod.POST) + public Map editXmTaskSbillDetail(@RequestBody XmTaskSbillDetail xmTaskSbillDetail) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功更新一条数据"); + try{ + if(!StringUtils.hasText(xmTaskSbillDetail.getId())) { + return failed("pk-not-exists","请上送主键参数id"); + } + XmTaskSbillDetail xmTaskSbillDetailDb = xmTaskSbillDetailService.selectOneObject(xmTaskSbillDetail); + if( xmTaskSbillDetailDb == null ){ + return failed("data-not-exists","数据不存在,无法修改"); + } + xmTaskSbillDetailService.updateSomeFieldByPk(xmTaskSbillDetail); + m.put("data",xmTaskSbillDetail); + }catch (BizException e) { + tips=e.getTips(); + logger.error("",e); + }catch (Exception e) { + tips.setFailureMsg(e.getMessage()); + logger.error("",e); + } + m.put("tips", tips); + return m; + } + */ + + /** + @ApiOperation( value = "批量修改某些字段",notes="") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskSbillDetail.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/editSomeFields",method=RequestMethod.POST) + public Map editSomeFields(@RequestBody Map xmTaskSbillDetailMap) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功更新一条数据"); + try{ + List ids= (List) xmTaskSbillDetailMap.get("ids"); + if(ids==null || ids.size()==0){ + return failed("ids-0","ids不能为空"); + } + + Set fields=new HashSet<>(); + fields.add("id"); + for (String fieldName : xmTaskSbillDetailMap.keySet()) { + if(fields.contains(fieldName)){ + return failed(fieldName+"-no-edit",fieldName+"不允许修改"); + } + } + Set fieldKey=xmTaskSbillDetailMap.keySet().stream().filter(i-> fieldsMap.containsKey(i)).collect(Collectors.toSet()); + fieldKey=fieldKey.stream().filter(i->!StringUtils.isEmpty(xmTaskSbillDetailMap.get(i) )).collect(Collectors.toSet()); + + if(fieldKey.size()<=0) { + return failed("fieldKey-0","没有需要更新的字段"); + } + XmTaskSbillDetail xmTaskSbillDetail = fromMap(xmTaskSbillDetailMap,XmTaskSbillDetail.class); + List xmTaskSbillDetailsDb=xmTaskSbillDetailService.selectListByIds(ids); + if(xmTaskSbillDetailsDb==null ||xmTaskSbillDetailsDb.size()==0){ + return failed("data-0","记录已不存在"); + } + List can=new ArrayList<>(); + List no=new ArrayList<>(); + User user = LoginUtils.getCurrentUserInfo(); + for (XmTaskSbillDetail xmTaskSbillDetailDb : xmTaskSbillDetailsDb) { + Tips tips2 = new Tips("检查通过"); + if(!tips2.isOk()){ + no.add(xmTaskSbillDetailDb); + }else{ + can.add(xmTaskSbillDetailDb); + } + } + if(can.size()>0){ + xmTaskSbillDetailMap.put("ids",can.stream().map(i->i.getId()).collect(Collectors.toList())); + xmTaskSbillDetailService.editSomeFields(xmTaskSbillDetailMap); + } + List msgs=new ArrayList<>(); + if(can.size()>0){ + msgs.add(String.format("成功更新以下%s条数据",can.size())); + } + if(no.size()>0){ + msgs.add(String.format("以下%s个数据无权限更新",no.size())); + } + if(can.size()>0){ + tips.setOkMsg(msgs.stream().collect(Collectors.joining())); + }else { + tips.setFailureMsg(msgs.stream().collect(Collectors.joining())); + } + //m.put("data",xmMenu); + }catch (BizException e) { + tips=e.getTips(); + logger.error("",e); + }catch (Exception e) { + tips.setFailureMsg(e.getMessage()); + logger.error("",e); + } + m.put("tips", tips); + return m; + } + */ + + /** + @ApiOperation( value = "根据主键列表批量删除工时登记表信息",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") + }) + @RequestMapping(value="/batchDel",method=RequestMethod.POST) + public Map batchDelXmTaskSbillDetail(@RequestBody List xmTaskSbillDetails) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功删除"); + try{ + if(xmTaskSbillDetails.size()<=0){ + return failed("data-0","请上送待删除数据列表"); + } + List datasDb=xmTaskSbillDetailService.selectListByIds(xmTaskSbillDetails.stream().map(i-> i.getId() ).collect(Collectors.toList())); + + List can=new ArrayList<>(); + List no=new ArrayList<>(); + for (XmTaskSbillDetail data : datasDb) { + if(true){ + can.add(data); + }else{ + no.add(data); + } + } + List msgs=new ArrayList<>(); + if(can.size()>0){ + xmTaskSbillDetailService.batchDelete(xmTaskSbillDetails); + msgs.add(String.format("成功删除%s条数据.",can.size())); + } + + if(no.size()>0){ + msgs.add(String.format("以下%s条数据不能删除.【%s】",no.size(),no.stream().map(i-> i.getId() ).collect(Collectors.joining(",")))); + } + if(can.size()>0){ + tips.setOkMsg(msgs.stream().collect(Collectors.joining())); + }else { + tips.setFailureMsg(msgs.stream().collect(Collectors.joining())); + } + }catch (BizException e) { + tips=e.getTips(); + logger.error("",e); + }catch (Exception e) { + tips.setFailureMsg(e.getMessage()); + logger.error("",e); + } + m.put("tips", tips); + return m; + } + */ +} diff --git a/xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java b/xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java index a2ec1286..9ef7a76a 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java @@ -8,9 +8,9 @@ import java.util.Date; /** * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmTaskSbill所有属性名:
- * id,title,amt,ctime,cuserid,cusername,remark,branchId,deptid,cpId,cpName,workload,bizMonth,bizDate,bizFlowState,bizProcInstId,ltime,status,fmsg,projectId,projectName;
+ * id,title,amt,ctime,cuserid,cusername,remark,branchId,deptid,cpId,cpName,workload,bizMonth,bizDate,bizFlowState,bizProcInstId,ltime,status,fmsg,projectId,projectName,userCnt;
* 表 xm_task_sbill 任务结算表的所有字段名:
- * id,title,amt,ctime,cuserid,cusername,remark,branch_id,deptid,cp_id,cp_name,workload,biz_month,biz_date,biz_flow_state,biz_proc_inst_id,ltime,status,fmsg,project_id,project_name;
+ * id,title,amt,ctime,cuserid,cusername,remark,branch_id,deptid,cp_id,cp_name,workload,biz_month,biz_date,biz_flow_state,biz_proc_inst_id,ltime,status,fmsg,project_id,project_name,user_cnt;
* 当前主键(包括多主键):
* id;
*/ @@ -82,6 +82,9 @@ public class XmTaskSbill implements java.io.Serializable { @ApiModelProperty(notes="项目名称",allowEmptyValue=true,example="",allowableValues="") String projectName; + + @ApiModelProperty(notes="结算人数",allowEmptyValue=true,example="",allowableValues="") + Integer userCnt; /**结算单据编号**/ public XmTaskSbill(String id) { @@ -218,6 +221,12 @@ public class XmTaskSbill implements java.io.Serializable { public void setProjectName(String projectName) { this.projectName = projectName; } + /** + * 结算人数 + **/ + public void setUserCnt(Integer userCnt) { + this.userCnt = userCnt; + } /** * 结算单据编号 @@ -345,5 +354,11 @@ public class XmTaskSbill implements java.io.Serializable { public String getProjectName() { return this.projectName; } + /** + * 结算人数 + **/ + public Integer getUserCnt() { + return this.userCnt; + } } \ No newline at end of file diff --git a/xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java b/xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java index 1afd8ec8..7731922b 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java @@ -8,9 +8,9 @@ import java.math.BigDecimal; /** * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmTaskWorkload所有属性名:
- * userid,username,ctime,taskId,cuserid,bizDate,wstatus,remark,ttype,id,sbillId,stime,sstatus,amt,samt,workload,rworkload,cusername,projectId,sworkload;
+ * userid,username,ctime,taskId,cuserid,bizDate,wstatus,remark,ttype,id,stime,sstatus,workload,rworkload,cusername,projectId,detailId;
* 表 xm_task_workload 工时登记表的所有字段名:
- * userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,sbill_id,stime,sstatus,amt,samt,workload,rworkload,cusername,project_id,sworkload;
+ * userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,stime,sstatus,workload,rworkload,cusername,project_id,detail_id;
* 当前主键(包括多主键):
* id;
*/ @@ -50,21 +50,12 @@ public class XmTaskWorkload implements java.io.Serializable { @ApiModelProperty(notes="任务类型-关联字典taskType",allowEmptyValue=true,example="",allowableValues="") String ttype; - @ApiModelProperty(notes="结算单据编号",allowEmptyValue=true,example="",allowableValues="") - String sbillId; - @ApiModelProperty(notes="结算提交时间",allowEmptyValue=true,example="",allowableValues="") Date stime; @ApiModelProperty(notes="结算状态0-无需结算,1-待结算2-已提交3-已通过4-已结算",allowEmptyValue=true,example="",allowableValues="") String sstatus; - @ApiModelProperty(notes="工时对应金额",allowEmptyValue=true,example="",allowableValues="") - BigDecimal amt; - - @ApiModelProperty(notes="结算工时对应结算金额",allowEmptyValue=true,example="",allowableValues="") - BigDecimal samt; - @ApiModelProperty(notes="工时,一个task_id可多次提交,小时",allowEmptyValue=true,example="",allowableValues="") BigDecimal workload; @@ -77,8 +68,8 @@ public class XmTaskWorkload implements java.io.Serializable { @ApiModelProperty(notes="归属项目",allowEmptyValue=true,example="",allowableValues="") String projectId; - @ApiModelProperty(notes="结算工时,用于结算,默认=workload",allowEmptyValue=true,example="",allowableValues="") - BigDecimal sworkload; + @ApiModelProperty(notes="结算明细编号,指向xm_task_sbill_detail.id",allowEmptyValue=true,example="",allowableValues="") + String detailId; /**主键**/ public XmTaskWorkload(String id) { @@ -149,12 +140,6 @@ public class XmTaskWorkload implements java.io.Serializable { public void setId(String id) { this.id = id; } - /** - * 结算单据编号 - **/ - public void setSbillId(String sbillId) { - this.sbillId = sbillId; - } /** * 结算提交时间 **/ @@ -167,18 +152,6 @@ public class XmTaskWorkload implements java.io.Serializable { public void setSstatus(String sstatus) { this.sstatus = sstatus; } - /** - * 工时对应金额 - **/ - public void setAmt(BigDecimal amt) { - this.amt = amt; - } - /** - * 结算工时对应结算金额 - **/ - public void setSamt(BigDecimal samt) { - this.samt = samt; - } /** * 工时,一个task_id可多次提交,小时 **/ @@ -204,10 +177,10 @@ public class XmTaskWorkload implements java.io.Serializable { this.projectId = projectId; } /** - * 结算工时,用于结算,默认=workload + * 结算明细编号,指向xm_task_sbill_detail.id **/ - public void setSworkload(BigDecimal sworkload) { - this.sworkload = sworkload; + public void setDetailId(String detailId) { + this.detailId = detailId; } /** @@ -270,12 +243,6 @@ public class XmTaskWorkload implements java.io.Serializable { public String getId() { return this.id; } - /** - * 结算单据编号 - **/ - public String getSbillId() { - return this.sbillId; - } /** * 结算提交时间 **/ @@ -288,18 +255,6 @@ public class XmTaskWorkload implements java.io.Serializable { public String getSstatus() { return this.sstatus; } - /** - * 工时对应金额 - **/ - public BigDecimal getAmt() { - return this.amt; - } - /** - * 结算工时对应结算金额 - **/ - public BigDecimal getSamt() { - return this.samt; - } /** * 工时,一个task_id可多次提交,小时 **/ @@ -325,10 +280,10 @@ public class XmTaskWorkload implements java.io.Serializable { return this.projectId; } /** - * 结算工时,用于结算,默认=workload + * 结算明细编号,指向xm_task_sbill_detail.id **/ - public BigDecimal getSworkload() { - return this.sworkload; + public String getDetailId() { + return this.detailId; } } \ No newline at end of file diff --git a/xm-core/src/main/java/com/xm/core/service/XmTaskSbillDetailService.java b/xm-core/src/main/java/com/xm/core/service/XmTaskSbillDetailService.java new file mode 100644 index 00000000..1b0b9bfd --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/service/XmTaskSbillDetailService.java @@ -0,0 +1,24 @@ +package com.xm.core.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.util.List; +import java.util.Map; +import org.springframework.stereotype.Service; +import com.mdp.core.service.BaseService; +import static com.mdp.core.utils.BaseUtils.*; +import com.mdp.core.entity.Tips; +import com.mdp.core.err.BizException; + +import com.xm.core.entity.XmTaskSbillDetail; +/** + * 父类已经支持增删改查操作,因此,即使本类什么也不写,也已经可以满足一般的增删改查操作了.
+ * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskSbillDetail 表 xm_task_sbill_detail 当前主键(包括多主键): id; + ***/ +@Service("xm.core.xmTaskSbillDetailService") +public class XmTaskSbillDetailService extends BaseService { + static Logger logger =LoggerFactory.getLogger(XmTaskSbillDetailService.class); + +} + diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillDetailMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillDetailMapper.xml new file mode 100644 index 00000000..38917a69 --- /dev/null +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillDetailMapper.xml @@ -0,0 +1,264 @@ + + + + + + + + + and (res.id) in + + ( #{item}) + + + + + + + + + + + + + + + + + + + + + + + + + + insert into xm_task_sbill_detail( + + ) values ( + #{userid},#{username},#{ctime},#{taskId},#{bizDate},#{remark},#{id},#{sbillId},#{stime},#{sstatus},#{amt},#{samt},#{workload},#{projectId},#{sworkload},#{bizMonth},#{budgetAt},#{budgetWorkload},#{initWorkload},#{quoteAt},#{quoteWorkload},#{sschemel},#{uniPrice},#{qendTime},#{qstartTime},#{actEndTime},#{actStartTime} + ) + + + + + delete from xm_task_sbill_detail res + + + + + + + + delete from xm_task_sbill_detail + where id = #{id} + + + + + update xm_task_sbill_detail + + + + where id = #{id} + + + + + update xm_task_sbill_detail + + + + where id = #{id} + + + + + + + + update xm_task_sbill_detail + set + + where id = #{item.id} + + + + + + update xm_task_sbill_detail + + + + where (id) in + + ( #{item}) + + + + + delete from xm_task_sbill_detail + where + (id) in + + ( #{item.id} ) + + + + + + + userid,username,ctime,task_id,biz_date,remark,id,sbill_id,stime,sstatus,amt,samt,workload,project_id,sworkload,biz_month,budget_at,budget_workload,init_workload,quote_at,quote_workload,sschemel,uni_price,qend_time,qstart_time,act_end_time,act_start_time + + + + + and res.userid = #{userid} + and res.username = #{username} + and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') + and res.task_id = #{taskId} + and res.biz_date = #{bizDate} + and res.remark = #{remark} + and res.id = #{id} + and res.sbill_id = #{sbillId} + and date_format(res.stime,'%Y-%m-%d') = date_format(#{stime},'%Y-%m-%d') + and res.sstatus = #{sstatus} + and res.amt = #{amt} + and res.samt = #{samt} + and res.workload = #{workload} + and res.project_id = #{projectId} + and res.sworkload = #{sworkload} + and res.biz_month = #{bizMonth} + and res.budget_at = #{budgetAt} + and res.budget_workload = #{budgetWorkload} + and res.init_workload = #{initWorkload} + and res.quote_at = #{quoteAt} + and res.quote_workload = #{quoteWorkload} + and res.sschemel = #{sschemel} + and res.uni_price = #{uniPrice} + and date_format(res.qend_time,'%Y-%m-%d') = date_format(#{qendTime},'%Y-%m-%d') + and date_format(res.qstart_time,'%Y-%m-%d') = date_format(#{qstartTime},'%Y-%m-%d') + and date_format(res.act_end_time,'%Y-%m-%d') = date_format(#{actEndTime},'%Y-%m-%d') + and date_format(res.act_start_time,'%Y-%m-%d') = date_format(#{actStartTime},'%Y-%m-%d') + + + + userid = #{userid}, + username = #{username}, + ctime = #{ctime}, + task_id = #{taskId}, + biz_date = #{bizDate}, + remark = #{remark}, + sbill_id = #{sbillId}, + stime = #{stime}, + sstatus = #{sstatus}, + amt = #{amt}, + samt = #{samt}, + workload = #{workload}, + project_id = #{projectId}, + sworkload = #{sworkload}, + biz_month = #{bizMonth}, + budget_at = #{budgetAt}, + budget_workload = #{budgetWorkload}, + init_workload = #{initWorkload}, + quote_at = #{quoteAt}, + quote_workload = #{quoteWorkload}, + sschemel = #{sschemel}, + uni_price = #{uniPrice}, + qend_time = #{qendTime}, + qstart_time = #{qstartTime}, + act_end_time = #{actEndTime}, + act_start_time = #{actStartTime} + + + userid = #{userid}, + username = #{username}, + ctime = #{ctime}, + task_id = #{taskId}, + biz_date = #{bizDate}, + remark = #{remark}, + sbill_id = #{sbillId}, + stime = #{stime}, + sstatus = #{sstatus}, + amt = #{amt}, + samt = #{samt}, + workload = #{workload}, + project_id = #{projectId}, + sworkload = #{sworkload}, + biz_month = #{bizMonth}, + budget_at = #{budgetAt}, + budget_workload = #{budgetWorkload}, + init_workload = #{initWorkload}, + quote_at = #{quoteAt}, + quote_workload = #{quoteWorkload}, + sschemel = #{sschemel}, + uni_price = #{uniPrice}, + qend_time = #{qendTime}, + qstart_time = #{qstartTime}, + act_end_time = #{actEndTime}, + act_start_time = #{actStartTime}, + + + + userid = #{item.userid}, + username = #{item.username}, + ctime = #{item.ctime}, + task_id = #{item.taskId}, + biz_date = #{item.bizDate}, + remark = #{item.remark}, + sbill_id = #{item.sbillId}, + stime = #{item.stime}, + sstatus = #{item.sstatus}, + amt = #{item.amt}, + samt = #{item.samt}, + workload = #{item.workload}, + project_id = #{item.projectId}, + sworkload = #{item.sworkload}, + biz_month = #{item.bizMonth}, + budget_at = #{item.budgetAt}, + budget_workload = #{item.budgetWorkload}, + init_workload = #{item.initWorkload}, + quote_at = #{item.quoteAt}, + quote_workload = #{item.quoteWorkload}, + sschemel = #{item.sschemel}, + uni_price = #{item.uniPrice}, + qend_time = #{item.qendTime}, + qstart_time = #{item.qstartTime}, + act_end_time = #{item.actEndTime}, + act_start_time = #{item.actStartTime} + + \ No newline at end of file diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml index f54f9b61..856bc817 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml @@ -90,7 +90,7 @@ insert into xm_task_sbill( ) values ( - #{id},#{title},#{amt},#{ctime},#{cuserid},#{cusername},#{remark},#{branchId},#{deptid},#{cpId},#{cpName},#{workload},#{bizMonth},#{bizDate},#{bizFlowState},#{bizProcInstId},#{ltime},#{status},#{fmsg},#{projectId},#{projectName} + #{id},#{title},#{amt},#{ctime},#{cuserid},#{cusername},#{remark},#{branchId},#{deptid},#{cpId},#{cpName},#{workload},#{bizMonth},#{bizDate},#{bizFlowState},#{bizProcInstId},#{ltime},#{status},#{fmsg},#{projectId},#{projectName},#{userCnt} ) @@ -165,7 +165,7 @@ - id,title,amt,ctime,cuserid,cusername,remark,branch_id,deptid,cp_id,cp_name,workload,biz_month,biz_date,biz_flow_state,biz_proc_inst_id,ltime,status,fmsg,project_id,project_name + id,title,amt,ctime,cuserid,cusername,remark,branch_id,deptid,cp_id,cp_name,workload,biz_month,biz_date,biz_flow_state,biz_proc_inst_id,ltime,status,fmsg,project_id,project_name,user_cnt @@ -191,6 +191,7 @@ and res.fmsg = #{fmsg} and res.project_id = #{projectId} and res.project_name = #{projectName} + and res.user_cnt = #{userCnt} @@ -213,7 +214,8 @@ status = #{status}, fmsg = #{fmsg}, project_id = #{projectId}, - project_name = #{projectName} + project_name = #{projectName}, + user_cnt = #{userCnt} title = #{title}, @@ -236,6 +238,7 @@ fmsg = #{fmsg}, project_id = #{projectId}, project_name = #{projectName}, + user_cnt = #{userCnt}, @@ -258,6 +261,7 @@ status = #{item.status}, fmsg = #{item.fmsg}, project_id = #{item.projectId}, - project_name = #{item.projectName} + project_name = #{item.projectName}, + user_cnt = #{item.userCnt} \ No newline at end of file diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml index f1334670..8509b203 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml @@ -64,17 +64,6 @@ - - update xm_task_workload res - - - - where id in - - #{item} - - -