8 changed files with 1513 additions and 0 deletions
-
213xm-core/src/main/java/com/xm/core/ctrl/XmTaskSbillController.java
-
199xm-core/src/main/java/com/xm/core/ctrl/XmTaskWorkloadController.java
-
349xm-core/src/main/java/com/xm/core/entity/XmTaskSbill.java
-
274xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java
-
24xm-core/src/main/java/com/xm/core/service/XmTaskSbillService.java
-
24xm-core/src/main/java/com/xm/core/service/XmTaskWorkloadService.java
-
222xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskSbillMapper.xml
-
208xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskWorkloadMapper.xml
@ -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分别为:<br> |
|||
* 新增: core/xmTaskSbill/add <br> |
|||
* 查询: core/xmTaskSbill/list<br> |
|||
* 模糊查询: core/xmTaskSbill/listKey<br> |
|||
* 修改: core/xmTaskSbill/edit <br> |
|||
* 删除: core/xmTaskSbill/del<br> |
|||
* 批量删除: core/xmTaskSbill/batchDel<br> |
|||
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> |
|||
* 实体 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<String,Object> listXmTaskSbill( @RequestParam Map<String,Object> xmTaskSbill){ |
|||
Map<String,Object> m = new HashMap<>(); |
|||
Tips tips=new Tips("查询成功"); |
|||
RequestUtils.transformArray(xmTaskSbill, "ids"); |
|||
PageUtils.startPage(xmTaskSbill); |
|||
List<Map<String,Object>> 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<String,Object> addXmTaskSbill(@RequestBody XmTaskSbill xmTaskSbill) { |
|||
Map<String,Object> 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<String,Object> delXmTaskSbill(@RequestBody XmTaskSbill xmTaskSbill){ |
|||
Map<String,Object> 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<String,Object> editXmTaskSbill(@RequestBody XmTaskSbill xmTaskSbill) { |
|||
Map<String,Object> 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<String,Object> batchDelXmTaskSbill(@RequestBody List<XmTaskSbill> xmTaskSbills) { |
|||
Map<String,Object> 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; |
|||
} |
|||
*/ |
|||
} |
|||
@ -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分别为:<br> |
|||
* 新增: core/xmTaskWorkload/add <br> |
|||
* 查询: core/xmTaskWorkload/list<br> |
|||
* 模糊查询: core/xmTaskWorkload/listKey<br> |
|||
* 修改: core/xmTaskWorkload/edit <br> |
|||
* 删除: core/xmTaskWorkload/del<br> |
|||
* 批量删除: core/xmTaskWorkload/batchDel<br> |
|||
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> |
|||
* 实体 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<String,Object> listXmTaskWorkload( @RequestParam Map<String,Object> xmTaskWorkload){ |
|||
Map<String,Object> m = new HashMap<>(); |
|||
Tips tips=new Tips("查询成功"); |
|||
RequestUtils.transformArray(xmTaskWorkload, "ids"); |
|||
PageUtils.startPage(xmTaskWorkload); |
|||
List<Map<String,Object>> 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<String,Object> addXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload) { |
|||
Map<String,Object> 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<String,Object> delXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload){ |
|||
Map<String,Object> 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<String,Object> editXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload) { |
|||
Map<String,Object> 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<String,Object> batchDelXmTaskWorkload(@RequestBody List<XmTaskWorkload> xmTaskWorkloads) { |
|||
Map<String,Object> 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; |
|||
} |
|||
*/ |
|||
} |
|||
@ -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 小模块 <br> |
|||
* 实体 XmTaskSbill所有属性名: <br> |
|||
* id,title,amt,ctime,cuserid,cusername,remark,branchId,deptid,cpId,cpName,workload,bizMonth,bizDate,bizFlowState,bizProcInstId,ltime,status,fmsg,projectId,projectName;<br> |
|||
* 表 xm_task_sbill 任务结算表的所有字段名: <br> |
|||
* 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;<br> |
|||
* 当前主键(包括多主键):<br> |
|||
* id;<br> |
|||
*/ |
|||
@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; |
|||
} |
|||
|
|||
} |
|||
@ -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 小模块 <br> |
|||
* 实体 XmTaskWorkload所有属性名: <br> |
|||
* userid,username,ctime,taskId,cuserid,bizDate,wstatus,remark,ttype,id,sbillId,stime,sstatus,amt,samt,workload;<br> |
|||
* 表 xm_task_workload 工时登记表的所有字段名: <br> |
|||
* userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,sbill_id,stime,sstatus,amt,samt,workload;<br> |
|||
* 当前主键(包括多主键):<br> |
|||
* id;<br> |
|||
*/ |
|||
@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; |
|||
} |
|||
|
|||
} |
|||
@ -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; |
|||
/** |
|||
* 父类已经支持增删改查操作,因此,即使本类什么也不写,也已经可以满足一般的增删改查操作了.<br> |
|||
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> |
|||
* 实体 XmTaskSbill 表 xm_task_sbill 当前主键(包括多主键): id; |
|||
***/ |
|||
@Service("xm.core.xmTaskSbillService") |
|||
public class XmTaskSbillService extends BaseService { |
|||
static Logger logger =LoggerFactory.getLogger(XmTaskSbillService.class); |
|||
|
|||
} |
|||
|
|||
@ -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; |
|||
/** |
|||
* 父类已经支持增删改查操作,因此,即使本类什么也不写,也已经可以满足一般的增删改查操作了.<br> |
|||
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> |
|||
* 实体 XmTaskWorkload 表 xm_task_workload 当前主键(包括多主键): id; |
|||
***/ |
|||
@Service("xm.core.xmTaskWorkloadService") |
|||
public class XmTaskWorkloadService extends BaseService { |
|||
static Logger logger =LoggerFactory.getLogger(XmTaskWorkloadService.class); |
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,222 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.xm.core.entity.XmTaskSbill"> |
|||
|
|||
|
|||
<!--开始 自定sql函数区域 请在此区域添加自定义函数,其它区域尽量不要动,因为代码随时重新生成 --> |
|||
|
|||
<sql id="whereForMap"> |
|||
<if test="ids != null"> and (res.id) in |
|||
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" > |
|||
( #{id}) |
|||
</foreach> |
|||
</if> |
|||
<if test="key != null and key !='' "> </if> |
|||
</sql> |
|||
|
|||
|
|||
<!--结束 自定义sql函数区域--> |
|||
|
|||
|
|||
|
|||
<!-- 通过条件查询获取数据列表 返回list<map> --> |
|||
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> |
|||
select * from xm_task_sbill res |
|||
<where> |
|||
<include refid="whereForMap"/> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 通过条件查询获取数据列表 不分页 返回 list<Object> --> |
|||
<select id="selectListByWhere" parameterType="com.xm.core.entity.XmTaskSbill" resultType="com.xm.core.entity.XmTaskSbill"> |
|||
select * from xm_task_sbill res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 通过主键查询获取数据对象 返回object --> |
|||
<select id="selectOneObject" parameterType="com.xm.core.entity.XmTaskSbill" resultType="com.xm.core.entity.XmTaskSbill"> |
|||
select * from xm_task_sbill res |
|||
where |
|||
res.id = #{id} |
|||
</select> |
|||
|
|||
<!-- 通过主键查询获取数据对象 返回map--> |
|||
<select id="selectOneMap" parameterType="HashMap" resultType="HashMap"> |
|||
select * from xm_task_sbill res |
|||
where |
|||
res.id = #{id} |
|||
</select> |
|||
<!-- 获取数据条目 返回long --> |
|||
<select id="countByWhere" parameterType="com.xm.core.entity.XmTaskSbill" resultType="long"> |
|||
select count(1) from xm_task_sbill res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
<!-- 新增一条记录 主键id,--> |
|||
<insert id="insert" parameterType="com.xm.core.entity.XmTaskSbill" useGeneratedKeys="false" keyProperty="id"> |
|||
insert into xm_task_sbill( |
|||
<include refid="columns"/> |
|||
) values ( |
|||
#{id},#{title},#{amt},#{ctime},#{cuserid},#{cusername},#{remark},#{branchId},#{deptid},#{cpId},#{cpName},#{workload},#{bizMonth},#{bizDate},#{bizFlowState},#{bizProcInstId},#{ltime},#{status},#{fmsg},#{projectId},#{projectName} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 按条件删除若干条记录--> |
|||
<delete id="deleteByWhere" parameterType="com.xm.core.entity.XmTaskSbill"> |
|||
delete from xm_task_sbill |
|||
<where> |
|||
1=2 |
|||
</where> |
|||
</delete> |
|||
|
|||
<!-- 按主键删除一条记录--> |
|||
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmTaskSbill"> |
|||
delete from xm_task_sbill |
|||
where id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据条件修改若干条记录 --> |
|||
<update id="updateSomeFieldByPk" parameterType="com.xm.core.entity.XmTaskSbill"> |
|||
update xm_task_sbill |
|||
<set> |
|||
<include refid="someFieldSet"/> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<!-- 根据主键修改一条记录 --> |
|||
<update id="updateByPk" parameterType="com.xm.core.entity.XmTaskSbill"> |
|||
update xm_task_sbill |
|||
<set> |
|||
<include refid="set"/> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<!-- 批量新增 批量插入 借用insert 循环插入实现 |
|||
<insert id="batchInsert" parameterType="List"> |
|||
</insert> |
|||
--> |
|||
|
|||
<!-- 批量更新 --> |
|||
<update id="batchUpdate" parameterType="List"> |
|||
<foreach collection="list" item="item" index="index" separator=";" > |
|||
update xm_task_sbill |
|||
set |
|||
<include refid="batchSet"/> |
|||
where id = #{item.id} |
|||
</foreach> |
|||
</update> |
|||
<!-- 批量删除 --> |
|||
<delete id="batchDelete" parameterType="List"> |
|||
delete from xm_task_sbill |
|||
where |
|||
(id) in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|||
( #{item.id} ) |
|||
</foreach> |
|||
</delete> |
|||
|
|||
|
|||
<!--sql片段 列--> |
|||
<sql id="columns"> |
|||
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 |
|||
</sql> |
|||
|
|||
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> |
|||
<sql id="where"> |
|||
<if test="id != null and id != ''"> and res.id = #{id} </if> |
|||
<if test="title != null and title != ''"> and res.title = #{title} </if> |
|||
<if test="amt != null and amt != ''"> and res.amt = #{amt} </if> |
|||
<if test="ctime != null"> and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') </if> |
|||
<if test="cuserid != null and cuserid != ''"> and res.cuserid = #{cuserid} </if> |
|||
<if test="cusername != null and cusername != ''"> and res.cusername = #{cusername} </if> |
|||
<if test="remark != null and remark != ''"> and res.remark = #{remark} </if> |
|||
<if test="branchId != null and branchId != ''"> and res.branch_id = #{branchId} </if> |
|||
<if test="deptid != null and deptid != ''"> and res.deptid = #{deptid} </if> |
|||
<if test="cpId != null and cpId != ''"> and res.cp_id = #{cpId} </if> |
|||
<if test="cpName != null and cpName != ''"> and res.cp_name = #{cpName} </if> |
|||
<if test="workload != null and workload != ''"> and res.workload = #{workload} </if> |
|||
<if test="bizMonth != null and bizMonth != ''"> and res.biz_month = #{bizMonth} </if> |
|||
<if test="bizDate != null and bizDate != ''"> and res.biz_date = #{bizDate} </if> |
|||
<if test="bizFlowState != null and bizFlowState != ''"> and res.biz_flow_state = #{bizFlowState} </if> |
|||
<if test="bizProcInstId != null and bizProcInstId != ''"> and res.biz_proc_inst_id = #{bizProcInstId} </if> |
|||
<if test="ltime != null"> and date_format(res.ltime,'%Y-%m-%d') = date_format(#{ltime},'%Y-%m-%d') </if> |
|||
<if test="status != null and status != ''"> and res.status = #{status} </if> |
|||
<if test="fmsg != null and fmsg != ''"> and res.fmsg = #{fmsg} </if> |
|||
<if test="projectId != null and projectId != ''"> and res.project_id = #{projectId} </if> |
|||
<if test="projectName != null and projectName != ''"> and res.project_name = #{projectName} </if> |
|||
</sql> |
|||
<!--sql片段 更新字段 --> |
|||
<sql id="set"> |
|||
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} |
|||
</sql> |
|||
<sql id="someFieldSet"> |
|||
<if test="title != null and title != ''"> title = #{title}, </if> |
|||
<if test="amt != null and amt != ''"> amt = #{amt}, </if> |
|||
<if test="ctime != null"> ctime = #{ctime}, </if> |
|||
<if test="cuserid != null and cuserid != ''"> cuserid = #{cuserid}, </if> |
|||
<if test="cusername != null and cusername != ''"> cusername = #{cusername}, </if> |
|||
<if test="remark != null and remark != ''"> remark = #{remark}, </if> |
|||
<if test="branchId != null and branchId != ''"> branch_id = #{branchId}, </if> |
|||
<if test="deptid != null and deptid != ''"> deptid = #{deptid}, </if> |
|||
<if test="cpId != null and cpId != ''"> cp_id = #{cpId}, </if> |
|||
<if test="cpName != null and cpName != ''"> cp_name = #{cpName}, </if> |
|||
<if test="workload != null and workload != ''"> workload = #{workload}, </if> |
|||
<if test="bizMonth != null and bizMonth != ''"> biz_month = #{bizMonth}, </if> |
|||
<if test="bizDate != null and bizDate != ''"> biz_date = #{bizDate}, </if> |
|||
<if test="bizFlowState != null and bizFlowState != ''"> biz_flow_state = #{bizFlowState}, </if> |
|||
<if test="bizProcInstId != null and bizProcInstId != ''"> biz_proc_inst_id = #{bizProcInstId}, </if> |
|||
<if test="ltime != null"> ltime = #{ltime}, </if> |
|||
<if test="status != null and status != ''"> status = #{status}, </if> |
|||
<if test="fmsg != null and fmsg != ''"> fmsg = #{fmsg}, </if> |
|||
<if test="projectId != null and projectId != ''"> project_id = #{projectId}, </if> |
|||
<if test="projectName != null and projectName != ''"> project_name = #{projectName}, </if> |
|||
</sql> |
|||
<!--sql片段 批量更新 --> |
|||
<sql id="batchSet"> |
|||
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} |
|||
</sql> |
|||
</mapper> |
|||
@ -0,0 +1,208 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.xm.core.entity.XmTaskWorkload"> |
|||
|
|||
|
|||
<!--开始 自定sql函数区域 请在此区域添加自定义函数,其它区域尽量不要动,因为代码随时重新生成 --> |
|||
|
|||
<sql id="whereForMap"> |
|||
<if test=" ids != null"> and (res.id) in |
|||
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" > |
|||
( #{item}) |
|||
</foreach> |
|||
</if> |
|||
<if test="key != null and key !='' "> </if> |
|||
</sql> |
|||
|
|||
|
|||
<!--结束 自定义sql函数区域--> |
|||
|
|||
|
|||
|
|||
<!-- 通过条件查询获取数据列表 返回list<map> --> |
|||
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> |
|||
select * from xm_task_workload res |
|||
<where> |
|||
<include refid="whereForMap"/> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 通过条件查询获取数据列表 不分页 返回 list<Object> --> |
|||
<select id="selectListByWhere" parameterType="com.xm.core.entity.XmTaskWorkload" resultType="com.xm.core.entity.XmTaskWorkload"> |
|||
select * from xm_task_workload res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 通过主键查询获取数据对象 返回object --> |
|||
<select id="selectOneObject" parameterType="com.xm.core.entity.XmTaskWorkload" resultType="com.xm.core.entity.XmTaskWorkload"> |
|||
select * from xm_task_workload res |
|||
where |
|||
res.id = #{id} |
|||
</select> |
|||
<select id="selectListByIds" parameterType="List" resultType="com.xm.core.entity.XmTaskWorkload"> |
|||
select * from xm_task_workload res |
|||
where (res.id) in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|||
( #{item}) |
|||
</foreach> |
|||
</select> |
|||
<!-- 通过主键查询获取数据对象 返回map--> |
|||
<select id="selectOneMap" parameterType="HashMap" resultType="HashMap"> |
|||
select * from xm_task_workload res |
|||
where |
|||
res.id = #{id} |
|||
</select> |
|||
<!-- 获取数据条目 返回long --> |
|||
<select id="countByWhere" parameterType="com.xm.core.entity.XmTaskWorkload" resultType="long"> |
|||
select count(1) from xm_task_workload res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
<!-- 新增一条记录 主键id,--> |
|||
<insert id="insert" parameterType="com.xm.core.entity.XmTaskWorkload" useGeneratedKeys="false" keyProperty="id"> |
|||
insert into xm_task_workload( |
|||
<include refid="columns"/> |
|||
) values ( |
|||
#{userid},#{username},#{ctime},#{taskId},#{cuserid},#{bizDate},#{wstatus},#{remark},#{ttype},#{id},#{sbillId},#{stime},#{sstatus},#{amt},#{samt},#{workload} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 按条件删除若干条记录--> |
|||
<delete id="deleteByWhere" parameterType="com.xm.core.entity.XmTaskWorkload"> |
|||
delete from xm_task_workload res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</delete> |
|||
|
|||
<!-- 按主键删除一条记录--> |
|||
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmTaskWorkload"> |
|||
delete from xm_task_workload |
|||
where id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据条件修改若干条记录 --> |
|||
<update id="updateSomeFieldByPk" parameterType="com.xm.core.entity.XmTaskWorkload"> |
|||
update xm_task_workload |
|||
<set> |
|||
<include refid="someFieldSet"/> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<!-- 根据主键修改一条记录 --> |
|||
<update id="updateByPk" parameterType="com.xm.core.entity.XmTaskWorkload"> |
|||
update xm_task_workload |
|||
<set> |
|||
<include refid="set"/> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<!-- 批量新增 批量插入 借用insert 循环插入实现 |
|||
<insert id="batchInsert" parameterType="List"> |
|||
</insert> |
|||
--> |
|||
|
|||
<!-- 批量更新 --> |
|||
<update id="batchUpdate" parameterType="List"> |
|||
<foreach collection="list" item="item" index="index" separator=";" > |
|||
update xm_task_workload |
|||
set |
|||
<include refid="batchSet"/> |
|||
where id = #{item.id} |
|||
</foreach> |
|||
</update> |
|||
<!-- 批量删除 --> |
|||
<delete id="batchDelete" parameterType="List"> |
|||
delete from xm_task_workload |
|||
where |
|||
(id) in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|||
( #{item.id} ) |
|||
</foreach> |
|||
</delete> |
|||
|
|||
|
|||
<!--sql片段 列--> |
|||
<sql id="columns"> |
|||
userid,username,ctime,task_id,cuserid,biz_date,wstatus,remark,ttype,id,sbill_id,stime,sstatus,amt,samt,workload |
|||
</sql> |
|||
|
|||
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> |
|||
<sql id="where"> |
|||
<if test="userid != null and userid != ''"> and res.userid = #{userid} </if> |
|||
<if test="username != null and username != ''"> and res.username = #{username} </if> |
|||
<if test="ctime != null"> and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') </if> |
|||
<if test="taskId != null and taskId != ''"> and res.task_id = #{taskId} </if> |
|||
<if test="cuserid != null and cuserid != ''"> and res.cuserid = #{cuserid} </if> |
|||
<if test="bizDate != null and bizDate != ''"> and res.biz_date = #{bizDate} </if> |
|||
<if test="wstatus != null and wstatus != ''"> and res.wstatus = #{wstatus} </if> |
|||
<if test="remark != null and remark != ''"> and res.remark = #{remark} </if> |
|||
<if test="ttype != null and ttype != ''"> and res.ttype = #{ttype} </if> |
|||
<if test="id != null and id != ''"> and res.id = #{id} </if> |
|||
<if test="sbillId != null and sbillId != ''"> and res.sbill_id = #{sbillId} </if> |
|||
<if test="stime != null"> and date_format(res.stime,'%Y-%m-%d') = date_format(#{stime},'%Y-%m-%d') </if> |
|||
<if test="sstatus != null and sstatus != ''"> and res.sstatus = #{sstatus} </if> |
|||
<if test="amt != null and amt != ''"> and res.amt = #{amt} </if> |
|||
<if test="samt != null and samt != ''"> and res.samt = #{samt} </if> |
|||
<if test="workload != null and workload != ''"> and res.workload = #{workload} </if> |
|||
</sql> |
|||
<!--sql片段 更新字段 --> |
|||
<sql id="set"> |
|||
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} |
|||
</sql> |
|||
<sql id="someFieldSet"> |
|||
<if test="userid != null and userid != ''"> userid = #{userid}, </if> |
|||
<if test="username != null and username != ''"> username = #{username}, </if> |
|||
<if test="ctime != null"> ctime = #{ctime}, </if> |
|||
<if test="taskId != null and taskId != ''"> task_id = #{taskId}, </if> |
|||
<if test="cuserid != null and cuserid != ''"> cuserid = #{cuserid}, </if> |
|||
<if test="bizDate != null and bizDate != ''"> biz_date = #{bizDate}, </if> |
|||
<if test="wstatus != null and wstatus != ''"> wstatus = #{wstatus}, </if> |
|||
<if test="remark != null and remark != ''"> remark = #{remark}, </if> |
|||
<if test="ttype != null and ttype != ''"> ttype = #{ttype}, </if> |
|||
<if test="sbillId != null and sbillId != ''"> sbill_id = #{sbillId}, </if> |
|||
<if test="stime != null"> stime = #{stime}, </if> |
|||
<if test="sstatus != null and sstatus != ''"> sstatus = #{sstatus}, </if> |
|||
<if test="amt != null and amt != ''"> amt = #{amt}, </if> |
|||
<if test="samt != null and samt != ''"> samt = #{samt}, </if> |
|||
<if test="workload != null and workload != ''"> workload = #{workload}, </if> |
|||
</sql> |
|||
<!--sql片段 批量更新 --> |
|||
<sql id="batchSet"> |
|||
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} |
|||
</sql> |
|||
</mapper> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue