From 2e5a58d4bd0eefadbcef4b0773567d65a2f77461 Mon Sep 17 00:00:00 2001 From: chentaiyu Date: Sat, 26 Mar 2022 19:10:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E7=AE=97=E6=9A=82?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xm/core/ctrl/XmTaskSbillController.java | 213 +++++++++++ .../core/ctrl/XmTaskWorkloadController.java | 199 ++++++++++ .../java/com/xm/core/entity/XmTaskSbill.java | 349 ++++++++++++++++++ .../com/xm/core/entity/XmTaskWorkload.java | 274 ++++++++++++++ .../xm/core/service/XmTaskSbillService.java | 24 ++ .../core/service/XmTaskWorkloadService.java | 24 ++ .../mapper/xm/core/dao/XmTaskSbillMapper.xml | 222 +++++++++++ .../xm/core/dao/XmTaskWorkloadMapper.xml | 208 +++++++++++ 8 files changed, 1513 insertions(+) create mode 100644 xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillController.java create mode 100644 xm-core/src/main/java/com/xm/core/ctrl/XmTaskWorkloadController.java create mode 100644 xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java create mode 100644 xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java create mode 100644 xm-core/src/main/java/com/xm/core/service/XmTaskSbillService.java create mode 100644 xm-core/src/main/java/com/xm/core/service/XmTaskWorkloadService.java create mode 100644 xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml create mode 100644 xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillController.java new file mode 100644 index 00000000..663b8f18 --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillController.java @@ -0,0 +1,213 @@ +package com.xm.core.ctrl; + +import java.math.BigDecimal; +import java.util.*; + +import com.mdp.core.utils.LogUtils; +import com.mdp.safe.client.entity.User; +import com.mdp.safe.client.utils.LoginUtils; +import com.mysql.cj.protocol.x.XMessage; +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.ModelAttribute; +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 org.springframework.stereotype.Controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiModel; +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.xm.core.service.XmTaskSbillService; +import com.xm.core.entity.XmTaskSbill; +/** + * url编制采用rest风格,如对xm_task_sbill 任务结算表的操作有增删改查,对应的url分别为:
+ * 新增: core/xmTaskSbill/add
+ * 查询: core/xmTaskSbill/list
+ * 模糊查询: core/xmTaskSbill/listKey
+ * 修改: core/xmTaskSbill/edit
+ * 删除: core/xmTaskSbill/del
+ * 批量删除: core/xmTaskSbill/batchDel
+ * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskSbill 表 xm_task_sbill 当前主键(包括多主键): id; + ***/ +@RestController("xm.core.xmTaskSbillController") +@RequestMapping(value="/**/core/xmTaskSbill") +@Api(tags={"任务结算表操作接口"}) +public class XmTaskSbillController { + + static Logger logger =LoggerFactory.getLogger(XmTaskSbillController.class); + + @Autowired + private XmTaskSbillService xmTaskSbillService; + + + + + @ApiOperation( value = "查询任务结算表信息列表",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskSbill.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") + }) + @RequestMapping(value="/list",method=RequestMethod.GET) + public Map listXmTaskSbill( @RequestParam Map xmTaskSbill){ + Map m = new HashMap<>(); + Tips tips=new Tips("查询成功"); + RequestUtils.transformArray(xmTaskSbill, "ids"); + PageUtils.startPage(xmTaskSbill); + List> xmTaskSbillList = xmTaskSbillService.selectListMapByWhere(xmTaskSbill); //列出XmTaskSbill列表 + PageUtils.responePage(m, xmTaskSbillList); + m.put("data",xmTaskSbillList); + + m.put("tips", tips); + return m; + } + + + + + @ApiOperation( value = "新增一条任务结算表信息",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskSbill.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/add",method=RequestMethod.POST) + public Map addXmTaskSbill(@RequestBody XmTaskSbill xmTaskSbill) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功新增一条数据"); + try{ + boolean createPk=false; + if(StringUtils.isEmpty(xmTaskSbill.getId())) { + createPk=true; + xmTaskSbill.setId(xmTaskSbillService.createKey("id")); + } + if(createPk==false){ + if(xmTaskSbillService.selectOneObject(xmTaskSbill) !=null ){ + tips.setFailureMsg("编号重复,请修改编号再提交"); + m.put("tips", tips); + return m; + } + } + User user = LoginUtils.getCurrentUserInfo(); + xmTaskSbill.setAmt(BigDecimal.ZERO); + xmTaskSbill.setCtime(new Date()); + xmTaskSbill.setCuserid(user.getUserid()); + xmTaskSbill.setCusername(user.getUsername()); + xmTaskSbill.setBizDate(user.getBranchId()); + xmTaskSbill.setDeptid(user.getDeptid()); + xmTaskSbill.setWorkload(BigDecimal.ZERO); + xmTaskSbill.setBizFlowState("0"); + xmTaskSbill.setBizProcInstId(xmTaskSbill.getId()); + xmTaskSbill.setLtime(new Date()); + xmTaskSbill.setStatus("0"); + xmTaskSbill.setFmsg(""); + + xmTaskSbillService.insert(xmTaskSbill); + m.put("data",xmTaskSbill); + }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 delXmTaskSbill(@RequestBody XmTaskSbill xmTaskSbill){ + Map m = new HashMap<>(); + Tips tips=new Tips("成功删除一条数据"); + if(!"0".equals(xmTaskSbill.getStatus())){ + tips.setFailureMsg("当前状态不允许删除"); + m.put("tips", tips); + return m; + } + try{ + xmTaskSbillService.deleteByPk(xmTaskSbill); + }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=XmTaskSbill.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/edit",method=RequestMethod.POST) + public Map editXmTaskSbill(@RequestBody XmTaskSbill xmTaskSbill) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功更新一条数据"); + if(!"0".equals(xmTaskSbill.getStatus())){ + tips.setFailureMsg("当前状态不允许修改"); + m.put("tips", tips); + return m; + } + try{ + xmTaskSbillService.updateByPk(xmTaskSbill); + m.put("data",xmTaskSbill); + }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 batchDelXmTaskSbill(@RequestBody List xmTaskSbills) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功删除"+xmTaskSbills.size()+"条数据"); + try{ + xmTaskSbillService.batchDelete(xmTaskSbills); + }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/ctrl/XmTaskWorkloadController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskWorkloadController.java new file mode 100644 index 00000000..90a92e35 --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskWorkloadController.java @@ -0,0 +1,199 @@ +package com.xm.core.ctrl; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +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.ModelAttribute; +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 org.springframework.stereotype.Controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiModel; +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.xm.core.service.XmTaskWorkloadService; +import com.xm.core.entity.XmTaskWorkload; +/** + * url编制采用rest风格,如对xm_task_workload 工时登记表的操作有增删改查,对应的url分别为:
+ * 新增: core/xmTaskWorkload/add
+ * 查询: core/xmTaskWorkload/list
+ * 模糊查询: core/xmTaskWorkload/listKey
+ * 修改: core/xmTaskWorkload/edit
+ * 删除: core/xmTaskWorkload/del
+ * 批量删除: core/xmTaskWorkload/batchDel
+ * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskWorkload 表 xm_task_workload 当前主键(包括多主键): id; + ***/ +@RestController("xm.core.xmTaskWorkloadController") +@RequestMapping(value="/**/core/xmTaskWorkload") +@Api(tags={"工时登记表操作接口"}) +public class XmTaskWorkloadController { + + static Logger logger =LoggerFactory.getLogger(XmTaskWorkloadController.class); + + @Autowired + private XmTaskWorkloadService xmTaskWorkloadService; + + + + + @ApiOperation( value = "查询工时登记表信息列表",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskWorkload.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") + }) + @RequestMapping(value="/list",method=RequestMethod.GET) + public Map listXmTaskWorkload( @RequestParam Map xmTaskWorkload){ + Map m = new HashMap<>(); + Tips tips=new Tips("查询成功"); + RequestUtils.transformArray(xmTaskWorkload, "ids"); + PageUtils.startPage(xmTaskWorkload); + List> xmTaskWorkloadList = xmTaskWorkloadService.selectListMapByWhere(xmTaskWorkload); //列出XmTaskWorkload列表 + PageUtils.responePage(m, xmTaskWorkloadList); + m.put("data",xmTaskWorkloadList); + + m.put("tips", tips); + return m; + } + + + + /** + @ApiOperation( value = "新增一条工时登记表信息",notes=" ") + @ApiResponses({ + @ApiResponse(code = 200,response=XmTaskWorkload.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/add",method=RequestMethod.POST) + public Map addXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功新增一条数据"); + try{ + boolean createPk=false; + if(!StringUtils.hasText(xmTaskWorkload.getId())) { + createPk=true; + xmTaskWorkload.setId(xmTaskWorkloadService.createKey("id")); + } + if(createPk==false){ + if(xmTaskWorkloadService.selectOneObject(xmTaskWorkload) !=null ){ + return failed("pk-exists","编号重复,请修改编号再提交"); + } + } + xmTaskWorkloadService.insert(xmTaskWorkload); + m.put("data",xmTaskWorkload); + }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 delXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload){ + Map m = new HashMap<>(); + Tips tips=new Tips("成功删除一条数据"); + try{ + if(!StringUtils.hasText(xmTaskWorkload.getId())) { + return failed("pk-not-exists","请上送主键参数id"); + } + XmTaskWorkload xmTaskWorkloadDb = xmTaskWorkloadService.selectOneObject(xmTaskWorkload); + if( xmTaskWorkloadDb == null ){ + return failed("data-not-exists","数据不存在,无法删除"); + } + xmTaskWorkloadService.deleteByPk(xmTaskWorkload); + }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=XmTaskWorkload.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") + }) + @RequestMapping(value="/edit",method=RequestMethod.POST) + public Map editXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功更新一条数据"); + try{ + if(!StringUtils.hasText(xmTaskWorkload.getId())) { + return failed("pk-not-exists","请上送主键参数id"); + } + XmTaskWorkload xmTaskWorkloadDb = xmTaskWorkloadService.selectOneObject(xmTaskWorkload); + if( xmTaskWorkloadDb == null ){ + return failed("data-not-exists","数据不存在,无法修改"); + } + xmTaskWorkloadService.updateSomeFieldByPk(xmTaskWorkload); + m.put("data",xmTaskWorkload); + }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 batchDelXmTaskWorkload(@RequestBody List xmTaskWorkloads) { + Map m = new HashMap<>(); + Tips tips=new Tips("成功删除"+xmTaskWorkloads.size()+"条数据"); + try{ + xmTaskWorkloadService.batchDelete(xmTaskWorkloads); + }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 new file mode 100644 index 00000000..fcd938d0 --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java @@ -0,0 +1,349 @@ +package com.xm.core.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +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;
+ * 表 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;
+ */ +@ApiModel(description="任务结算表") +public class XmTaskSbill implements java.io.Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(notes="结算单据编号,主键",allowEmptyValue=true,example="",allowableValues="") + String id; + + + @ApiModelProperty(notes="结算单标题",allowEmptyValue=true,example="",allowableValues="") + String title; + + @ApiModelProperty(notes="金额=工时表中结算金额之和",allowEmptyValue=true,example="",allowableValues="") + BigDecimal amt; + + @ApiModelProperty(notes="创建时间",allowEmptyValue=true,example="",allowableValues="") + Date ctime; + + @ApiModelProperty(notes="创建人编号",allowEmptyValue=true,example="",allowableValues="") + String cuserid; + + @ApiModelProperty(notes="创建人姓名",allowEmptyValue=true,example="",allowableValues="") + String cusername; + + @ApiModelProperty(notes="备注",allowEmptyValue=true,example="",allowableValues="") + String remark; + + @ApiModelProperty(notes="机构编号",allowEmptyValue=true,example="",allowableValues="") + String branchId; + + @ApiModelProperty(notes="部门编号",allowEmptyValue=true,example="",allowableValues="") + String deptid; + + @ApiModelProperty(notes="相对方编号(机构写机构号,个人写个人编号)",allowEmptyValue=true,example="",allowableValues="") + String cpId; + + @ApiModelProperty(notes="相对方名称(机构写机构名称,个人写个人名称)",allowEmptyValue=true,example="",allowableValues="") + String cpName; + + @ApiModelProperty(notes="结算工作量=工时表中工时之和",allowEmptyValue=true,example="",allowableValues="") + BigDecimal workload; + + @ApiModelProperty(notes="业务月份yyyy-MM",allowEmptyValue=true,example="",allowableValues="") + String bizMonth; + + @ApiModelProperty(notes="业务日期yyyy-MM-dd",allowEmptyValue=true,example="",allowableValues="") + String bizDate; + + @ApiModelProperty(notes="结算流程状态",allowEmptyValue=true,example="",allowableValues="") + String bizFlowState; + + @ApiModelProperty(notes="结算流程实例",allowEmptyValue=true,example="",allowableValues="") + String bizProcInstId; + + @ApiModelProperty(notes="更新时间",allowEmptyValue=true,example="",allowableValues="") + Date ltime; + + @ApiModelProperty(notes="0-待提交,1-已提交,2-已通过,3-已付款,4-已完成",allowEmptyValue=true,example="",allowableValues="") + String status; + + @ApiModelProperty(notes="最后审核意见",allowEmptyValue=true,example="",allowableValues="") + String fmsg; + + @ApiModelProperty(notes="项目编号",allowEmptyValue=true,example="",allowableValues="") + String projectId; + + @ApiModelProperty(notes="项目名称",allowEmptyValue=true,example="",allowableValues="") + String projectName; + + /**结算单据编号**/ + public XmTaskSbill(String id) { + this.id = id; + } + + /**任务结算表**/ + public XmTaskSbill() { + } + + /** + * 结算单据编号 + **/ + public void setId(String id) { + this.id = id; + } + /** + * 结算单标题 + **/ + public void setTitle(String title) { + this.title = title; + } + /** + * 金额=工时表中结算金额之和 + **/ + public void setAmt(BigDecimal amt) { + this.amt = amt; + } + /** + * 创建时间 + **/ + public void setCtime(Date ctime) { + this.ctime = ctime; + } + /** + * 创建人编号 + **/ + public void setCuserid(String cuserid) { + this.cuserid = cuserid; + } + /** + * 创建人姓名 + **/ + public void setCusername(String cusername) { + this.cusername = cusername; + } + /** + * 备注 + **/ + public void setRemark(String remark) { + this.remark = remark; + } + /** + * 机构编号 + **/ + public void setBranchId(String branchId) { + this.branchId = branchId; + } + /** + * 部门编号 + **/ + public void setDeptid(String deptid) { + this.deptid = deptid; + } + /** + * 相对方编号(机构写机构号,个人写个人编号) + **/ + public void setCpId(String cpId) { + this.cpId = cpId; + } + /** + * 相对方名称(机构写机构名称,个人写个人名称) + **/ + public void setCpName(String cpName) { + this.cpName = cpName; + } + /** + * 结算工作量=工时表中工时之和 + **/ + public void setWorkload(BigDecimal workload) { + this.workload = workload; + } + /** + * 业务月份yyyy-MM + **/ + public void setBizMonth(String bizMonth) { + this.bizMonth = bizMonth; + } + /** + * 业务日期yyyy-MM-dd + **/ + public void setBizDate(String bizDate) { + this.bizDate = bizDate; + } + /** + * 结算流程状态 + **/ + public void setBizFlowState(String bizFlowState) { + this.bizFlowState = bizFlowState; + } + /** + * 结算流程实例 + **/ + public void setBizProcInstId(String bizProcInstId) { + this.bizProcInstId = bizProcInstId; + } + /** + * 更新时间 + **/ + public void setLtime(Date ltime) { + this.ltime = ltime; + } + /** + * 0-待提交,1-已提交,2-已通过,3-已付款,4-已完成 + **/ + public void setStatus(String status) { + this.status = status; + } + /** + * 最后审核意见 + **/ + public void setFmsg(String fmsg) { + this.fmsg = fmsg; + } + /** + * 项目编号 + **/ + public void setProjectId(String projectId) { + this.projectId = projectId; + } + /** + * 项目名称 + **/ + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + /** + * 结算单据编号 + **/ + public String getId() { + return this.id; + } + /** + * 结算单标题 + **/ + public String getTitle() { + return this.title; + } + /** + * 金额=工时表中结算金额之和 + **/ + public BigDecimal getAmt() { + return this.amt; + } + /** + * 创建时间 + **/ + public Date getCtime() { + return this.ctime; + } + /** + * 创建人编号 + **/ + public String getCuserid() { + return this.cuserid; + } + /** + * 创建人姓名 + **/ + public String getCusername() { + return this.cusername; + } + /** + * 备注 + **/ + public String getRemark() { + return this.remark; + } + /** + * 机构编号 + **/ + public String getBranchId() { + return this.branchId; + } + /** + * 部门编号 + **/ + public String getDeptid() { + return this.deptid; + } + /** + * 相对方编号(机构写机构号,个人写个人编号) + **/ + public String getCpId() { + return this.cpId; + } + /** + * 相对方名称(机构写机构名称,个人写个人名称) + **/ + public String getCpName() { + return this.cpName; + } + /** + * 结算工作量=工时表中工时之和 + **/ + public BigDecimal getWorkload() { + return this.workload; + } + /** + * 业务月份yyyy-MM + **/ + public String getBizMonth() { + return this.bizMonth; + } + /** + * 业务日期yyyy-MM-dd + **/ + public String getBizDate() { + return this.bizDate; + } + /** + * 结算流程状态 + **/ + public String getBizFlowState() { + return this.bizFlowState; + } + /** + * 结算流程实例 + **/ + public String getBizProcInstId() { + return this.bizProcInstId; + } + /** + * 更新时间 + **/ + public Date getLtime() { + return this.ltime; + } + /** + * 0-待提交,1-已提交,2-已通过,3-已付款,4-已完成 + **/ + public String getStatus() { + return this.status; + } + /** + * 最后审核意见 + **/ + public String getFmsg() { + return this.fmsg; + } + /** + * 项目编号 + **/ + public String getProjectId() { + return this.projectId; + } + /** + * 项目名称 + **/ + public String getProjectName() { + return this.projectName; + } + +} \ 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 new file mode 100644 index 00000000..665377cc --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java @@ -0,0 +1,274 @@ +package com.xm.core.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import java.math.BigDecimal; + +/** + * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskWorkload所有属性名:
+ * userid,username,ctime,taskId,cuserid,bizDate,wstatus,remark,ttype,id,sbillId,stime,sstatus,amt,samt,workload;
+ * 表 xm_task_workload 工时登记表的所有字段名:
+ * userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,sbill_id,stime,sstatus,amt,samt,workload;
+ * 当前主键(包括多主键):
+ * id;
+ */ +@ApiModel(description="工时登记表") +public class XmTaskWorkload implements java.io.Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(notes="主键,主键",allowEmptyValue=true,example="",allowableValues="") + Integer id; + + + @ApiModelProperty(notes="员工编号",allowEmptyValue=true,example="",allowableValues="") + String userid; + + @ApiModelProperty(notes="姓名",allowEmptyValue=true,example="",allowableValues="") + String username; + + @ApiModelProperty(notes="创建日期",allowEmptyValue=true,example="",allowableValues="") + Date ctime; + + @ApiModelProperty(notes="业务对象主键任务编号",allowEmptyValue=true,example="",allowableValues="") + String taskId; + + @ApiModelProperty(notes="创建人编号",allowEmptyValue=true,example="",allowableValues="") + String cuserid; + + @ApiModelProperty(notes="业务日期yyyy-MM-dd",allowEmptyValue=true,example="",allowableValues="") + String bizDate; + + @ApiModelProperty(notes="状态0-待确认,1-已确认,2-无效",allowEmptyValue=true,example="",allowableValues="") + String wstatus; + + @ApiModelProperty(notes="备注",allowEmptyValue=true,example="",allowableValues="") + String remark; + + @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; + + /**主键**/ + public XmTaskWorkload(Integer id) { + this.id = id; + } + + /**工时登记表**/ + public XmTaskWorkload() { + } + + /** + * 员工编号 + **/ + public void setUserid(String userid) { + this.userid = userid; + } + /** + * 姓名 + **/ + public void setUsername(String username) { + this.username = username; + } + /** + * 创建日期 + **/ + public void setCtime(Date ctime) { + this.ctime = ctime; + } + /** + * 业务对象主键任务编号 + **/ + public void setTaskId(String taskId) { + this.taskId = taskId; + } + /** + * 创建人编号 + **/ + public void setCuserid(String cuserid) { + this.cuserid = cuserid; + } + /** + * 业务日期yyyy-MM-dd + **/ + public void setBizDate(String bizDate) { + this.bizDate = bizDate; + } + /** + * 状态0-待确认,1-已确认,2-无效 + **/ + public void setWstatus(String wstatus) { + this.wstatus = wstatus; + } + /** + * 备注 + **/ + public void setRemark(String remark) { + this.remark = remark; + } + /** + * 任务类型-关联字典taskType + **/ + public void setTtype(String ttype) { + this.ttype = ttype; + } + /** + * 主键 + **/ + public void setId(Integer id) { + this.id = id; + } + /** + * 结算单据编号 + **/ + public void setSbillId(String sbillId) { + this.sbillId = sbillId; + } + /** + * 结算提交时间 + **/ + public void setStime(Date stime) { + this.stime = stime; + } + /** + * 结算状态0-无需结算,1-待结算2-已提交3-已通过4-已结算 + **/ + 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可多次提交,小时 + **/ + public void setWorkload(BigDecimal workload) { + this.workload = workload; + } + + /** + * 员工编号 + **/ + public String getUserid() { + return this.userid; + } + /** + * 姓名 + **/ + public String getUsername() { + return this.username; + } + /** + * 创建日期 + **/ + public Date getCtime() { + return this.ctime; + } + /** + * 业务对象主键任务编号 + **/ + public String getTaskId() { + return this.taskId; + } + /** + * 创建人编号 + **/ + public String getCuserid() { + return this.cuserid; + } + /** + * 业务日期yyyy-MM-dd + **/ + public String getBizDate() { + return this.bizDate; + } + /** + * 状态0-待确认,1-已确认,2-无效 + **/ + public String getWstatus() { + return this.wstatus; + } + /** + * 备注 + **/ + public String getRemark() { + return this.remark; + } + /** + * 任务类型-关联字典taskType + **/ + public String getTtype() { + return this.ttype; + } + /** + * 主键 + **/ + public Integer getId() { + return this.id; + } + /** + * 结算单据编号 + **/ + public String getSbillId() { + return this.sbillId; + } + /** + * 结算提交时间 + **/ + public Date getStime() { + return this.stime; + } + /** + * 结算状态0-无需结算,1-待结算2-已提交3-已通过4-已结算 + **/ + public String getSstatus() { + return this.sstatus; + } + /** + * 工时对应金额 + **/ + public BigDecimal getAmt() { + return this.amt; + } + /** + * 结算金额 + **/ + public BigDecimal getSamt() { + return this.samt; + } + /** + * 工时,一个task_id可多次提交,小时 + **/ + public BigDecimal getWorkload() { + return this.workload; + } + +} \ No newline at end of file diff --git a/xm-core/src/main/java/com/xm/core/service/XmTaskSbillService.java b/xm-core/src/main/java/com/xm/core/service/XmTaskSbillService.java new file mode 100644 index 00000000..bd4440fc --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/service/XmTaskSbillService.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.XmTaskSbill; +/** + * 父类已经支持增删改查操作,因此,即使本类什么也不写,也已经可以满足一般的增删改查操作了.
+ * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskSbill 表 xm_task_sbill 当前主键(包括多主键): id; + ***/ +@Service("xm.core.xmTaskSbillService") +public class XmTaskSbillService extends BaseService { + static Logger logger =LoggerFactory.getLogger(XmTaskSbillService.class); + +} + diff --git a/xm-core/src/main/java/com/xm/core/service/XmTaskWorkloadService.java b/xm-core/src/main/java/com/xm/core/service/XmTaskWorkloadService.java new file mode 100644 index 00000000..3f05534b --- /dev/null +++ b/xm-core/src/main/java/com/xm/core/service/XmTaskWorkloadService.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.XmTaskWorkload; +/** + * 父类已经支持增删改查操作,因此,即使本类什么也不写,也已经可以满足一般的增删改查操作了.
+ * 组织 com 顶级模块 xm 大模块 core 小模块
+ * 实体 XmTaskWorkload 表 xm_task_workload 当前主键(包括多主键): id; + ***/ +@Service("xm.core.xmTaskWorkloadService") +public class XmTaskWorkloadService extends BaseService { + static Logger logger =LoggerFactory.getLogger(XmTaskWorkloadService.class); + +} + 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 new file mode 100644 index 00000000..d9735607 --- /dev/null +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml @@ -0,0 +1,222 @@ + + + + + + + + + and (res.id) in + + ( #{id}) + + + + + + + + + + + + + + + + + + + + + + + + + + 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} + ) + + + + + delete from xm_task_sbill + + 1=2 + + + + + + delete from xm_task_sbill + where id = #{id} + + + + + update xm_task_sbill + + + + where id = #{id} + + + + + update xm_task_sbill + + + + where id = #{id} + + + + + + + + update xm_task_sbill + set + + where id = #{item.id} + + + + + delete from xm_task_sbill + where + (id) in + + ( #{item.id} ) + + + + + + + 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 + + + + + and res.id = #{id} + and res.title = #{title} + and res.amt = #{amt} + and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') + and res.cuserid = #{cuserid} + and res.cusername = #{cusername} + and res.remark = #{remark} + and res.branch_id = #{branchId} + and res.deptid = #{deptid} + and res.cp_id = #{cpId} + and res.cp_name = #{cpName} + and res.workload = #{workload} + and res.biz_month = #{bizMonth} + and res.biz_date = #{bizDate} + and res.biz_flow_state = #{bizFlowState} + and res.biz_proc_inst_id = #{bizProcInstId} + and date_format(res.ltime,'%Y-%m-%d') = date_format(#{ltime},'%Y-%m-%d') + and res.status = #{status} + and res.fmsg = #{fmsg} + and res.project_id = #{projectId} + and res.project_name = #{projectName} + + + + title = #{title}, + amt = #{amt}, + ctime = #{ctime}, + cuserid = #{cuserid}, + cusername = #{cusername}, + remark = #{remark}, + branch_id = #{branchId}, + deptid = #{deptid}, + cp_id = #{cpId}, + cp_name = #{cpName}, + workload = #{workload}, + biz_month = #{bizMonth}, + biz_date = #{bizDate}, + biz_flow_state = #{bizFlowState}, + biz_proc_inst_id = #{bizProcInstId}, + ltime = #{ltime}, + status = #{status}, + fmsg = #{fmsg}, + project_id = #{projectId}, + project_name = #{projectName} + + + title = #{title}, + amt = #{amt}, + ctime = #{ctime}, + cuserid = #{cuserid}, + cusername = #{cusername}, + remark = #{remark}, + branch_id = #{branchId}, + deptid = #{deptid}, + cp_id = #{cpId}, + cp_name = #{cpName}, + workload = #{workload}, + biz_month = #{bizMonth}, + biz_date = #{bizDate}, + biz_flow_state = #{bizFlowState}, + biz_proc_inst_id = #{bizProcInstId}, + ltime = #{ltime}, + status = #{status}, + fmsg = #{fmsg}, + project_id = #{projectId}, + project_name = #{projectName}, + + + + title = #{item.title}, + amt = #{item.amt}, + ctime = #{item.ctime}, + cuserid = #{item.cuserid}, + cusername = #{item.cusername}, + remark = #{item.remark}, + branch_id = #{item.branchId}, + deptid = #{item.deptid}, + cp_id = #{item.cpId}, + cp_name = #{item.cpName}, + workload = #{item.workload}, + biz_month = #{item.bizMonth}, + biz_date = #{item.bizDate}, + biz_flow_state = #{item.bizFlowState}, + biz_proc_inst_id = #{item.bizProcInstId}, + ltime = #{item.ltime}, + status = #{item.status}, + fmsg = #{item.fmsg}, + project_id = #{item.projectId}, + project_name = #{item.projectName} + + \ 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 new file mode 100644 index 00000000..c77a3f37 --- /dev/null +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml @@ -0,0 +1,208 @@ + + + + + + + + + and (res.id) in + + ( #{item}) + + + + + + + + + + + + + + + + + + + + + + + + + + insert into xm_task_workload( + + ) values ( + #{userid},#{username},#{ctime},#{taskId},#{cuserid},#{bizDate},#{wstatus},#{remark},#{ttype},#{id},#{sbillId},#{stime},#{sstatus},#{amt},#{samt},#{workload} + ) + + + + + delete from xm_task_workload res + + + + + + + + delete from xm_task_workload + where id = #{id} + + + + + update xm_task_workload + + + + where id = #{id} + + + + + update xm_task_workload + + + + where id = #{id} + + + + + + + + update xm_task_workload + set + + where id = #{item.id} + + + + + delete from xm_task_workload + where + (id) in + + ( #{item.id} ) + + + + + + + userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,sbill_id,stime,sstatus,amt,samt,workload + + + + + 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.cuserid = #{cuserid} + and res.biz_date = #{bizDate} + and res.wstatus = #{wstatus} + and res.remark = #{remark} + and res.ttype = #{ttype} + 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} + + + + userid = #{userid}, + username = #{username}, + ctime = #{ctime}, + task_id = #{taskId}, + cuserid = #{cuserid}, + biz_date = #{bizDate}, + wstatus = #{wstatus}, + remark = #{remark}, + ttype = #{ttype}, + sbill_id = #{sbillId}, + stime = #{stime}, + sstatus = #{sstatus}, + amt = #{amt}, + samt = #{samt}, + workload = #{workload} + + + userid = #{userid}, + username = #{username}, + ctime = #{ctime}, + task_id = #{taskId}, + cuserid = #{cuserid}, + biz_date = #{bizDate}, + wstatus = #{wstatus}, + remark = #{remark}, + ttype = #{ttype}, + sbill_id = #{sbillId}, + stime = #{stime}, + sstatus = #{sstatus}, + amt = #{amt}, + samt = #{samt}, + workload = #{workload}, + + + + userid = #{item.userid}, + username = #{item.username}, + ctime = #{item.ctime}, + task_id = #{item.taskId}, + cuserid = #{item.cuserid}, + biz_date = #{item.bizDate}, + wstatus = #{item.wstatus}, + remark = #{item.remark}, + ttype = #{item.ttype}, + sbill_id = #{item.sbillId}, + stime = #{item.stime}, + sstatus = #{item.sstatus}, + amt = #{item.amt}, + samt = #{item.samt}, + workload = #{item.workload} + + \ No newline at end of file