23 changed files with 45 additions and 865 deletions
-
3xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java
-
155xm-core/src/main/java/com/xm/core/ctrl/XmQuestionWorkloadController.java
-
155xm-core/src/main/java/com/xm/core/ctrl/XmTaskWorkloadController.java
-
109xm-core/src/main/java/com/xm/core/entity/XmQuestionTag.java
-
106xm-core/src/main/java/com/xm/core/entity/XmQuestionWorkload.java
-
142xm-core/src/main/java/com/xm/core/entity/XmTaskWorkload.java
-
2xm-core/src/main/java/com/xm/core/mapper/XmIterationMapper.java
-
12xm-core/src/main/java/com/xm/core/mapper/XmMenuMapper.java
-
8xm-core/src/main/java/com/xm/core/mapper/XmQuestionMapper.java
-
28xm-core/src/main/java/com/xm/core/mapper/XmQuestionWorkloadMapper.java
-
17xm-core/src/main/java/com/xm/core/mapper/XmQuestionWorkloadMapper.xml
-
28xm-core/src/main/java/com/xm/core/mapper/XmTaskWorkloadMapper.java
-
17xm-core/src/main/java/com/xm/core/mapper/XmTaskWorkloadMapper.xml
-
6xm-core/src/main/java/com/xm/core/service/XmIterationService.java
-
2xm-core/src/main/java/com/xm/core/service/XmIterationStateService.java
-
31xm-core/src/main/java/com/xm/core/service/XmMenuService.java
-
7xm-core/src/main/java/com/xm/core/service/XmProductService.java
-
6xm-core/src/main/java/com/xm/core/service/XmProjectService.java
-
17xm-core/src/main/java/com/xm/core/service/XmQuestionService.java
-
36xm-core/src/main/java/com/xm/core/service/XmQuestionWorkloadService.java
-
5xm-core/src/main/java/com/xm/core/service/XmTaskWorkloadService.java
-
7xm-core/src/test/java/com/xm/core/service/TestXmQuestionWorkloadService.java
-
7xm-core/src/test/java/com/xm/core/service/TestXmTaskWorkloadService.java
@ -1,155 +0,0 @@ |
|||||
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.*; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import com.mdp.core.entity.Result; |
|
||||
import com.mdp.core.query.QueryTools; |
|
||||
import static com.mdp.core.utils.BaseUtils.*; |
|
||||
import com.mdp.core.entity.Tips; |
|
||||
import com.mdp.core.entity.LangTips; |
|
||||
import com.mdp.core.err.BizException; |
|
||||
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.mdp.swagger.ApiEntityParams; |
|
||||
import io.swagger.annotations.*; |
|
||||
import springfox.documentation.annotations.ApiIgnore; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
|
|
||||
import com.xm.core.service.XmQuestionWorkloadService; |
|
||||
import com.xm.core.entity.XmQuestionWorkload; |
|
||||
/** |
|
||||
* @author maimeng-mdp code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
@RestController |
|
||||
@RequestMapping(value="/xm/core/xmQuestionWorkload") |
|
||||
@Api(tags={"工时登记表-操作接口"}) |
|
||||
public class XmQuestionWorkloadController { |
|
||||
|
|
||||
static Logger logger =LoggerFactory.getLogger(XmQuestionWorkloadController.class); |
|
||||
|
|
||||
@Autowired |
|
||||
private XmQuestionWorkloadService xmQuestionWorkloadService; |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-查询列表",notes=" ") |
|
||||
@ApiEntityParams(XmQuestionWorkload.class) |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmQuestionWorkload.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") |
|
||||
}) |
|
||||
@RequestMapping(value="/list",method=RequestMethod.GET) |
|
||||
public Result listXmQuestionWorkload(@ApiIgnore @RequestParam Map<String,Object> params){ |
|
||||
User user=LoginUtils.getCurrentUserInfo(); |
|
||||
QueryWrapper<XmQuestionWorkload> qw = QueryTools.initQueryWrapper(XmQuestionWorkload.class , params); |
|
||||
IPage page=QueryTools.initPage(params); |
|
||||
List<Map<String,Object>> datas = xmQuestionWorkloadService.selectListMapByWhere(page,qw,params); |
|
||||
return Result.ok("query-ok","查询成功").setData(datas).setTotal(page.getTotal()); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-新增",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmQuestionWorkload.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/add",method=RequestMethod.POST) |
|
||||
public Result addXmQuestionWorkload(@RequestBody XmQuestionWorkload xmQuestionWorkload) { |
|
||||
xmQuestionWorkloadService.save(xmQuestionWorkload); |
|
||||
return Result.ok("add-ok","添加成功!"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-删除",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") |
|
||||
}) |
|
||||
@RequestMapping(value="/del",method=RequestMethod.POST) |
|
||||
public Result delXmQuestionWorkload(@RequestBody XmQuestionWorkload xmQuestionWorkload){ |
|
||||
xmQuestionWorkloadService.removeById(xmQuestionWorkload); |
|
||||
return Result.ok("del-ok","删除成功!"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-修改",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmQuestionWorkload.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/edit",method=RequestMethod.POST) |
|
||||
public Result editXmQuestionWorkload(@RequestBody XmQuestionWorkload xmQuestionWorkload) { |
|
||||
xmQuestionWorkloadService.updateById(xmQuestionWorkload); |
|
||||
return Result.ok("edit-ok","修改成功!"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-批量修改某些字段",notes="") |
|
||||
@ApiEntityParams( value = XmQuestionWorkload.class, props={ }, remark = "工时登记表", paramType = "body" ) |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmQuestionWorkload.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/editSomeFields",method=RequestMethod.POST) |
|
||||
public Result editSomeFields( @ApiIgnore @RequestBody Map<String,Object> params) { |
|
||||
User user= LoginUtils.getCurrentUserInfo(); |
|
||||
xmQuestionWorkloadService.editSomeFields(params); |
|
||||
return Result.ok("edit-ok","更新成功"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-批量删除",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") |
|
||||
}) |
|
||||
@RequestMapping(value="/batchDel",method=RequestMethod.POST) |
|
||||
public Result batchDelXmQuestionWorkload(@RequestBody List<XmQuestionWorkload> xmQuestionWorkloads) { |
|
||||
User user= LoginUtils.getCurrentUserInfo(); |
|
||||
if(xmQuestionWorkloads.size()<=0){ |
|
||||
return Result.error("batchDel-data-err-0","请上送待删除数据列表"); |
|
||||
} |
|
||||
List<XmQuestionWorkload> datasDb=xmQuestionWorkloadService.listByIds(xmQuestionWorkloads.stream().map(i-> i.getId() ).collect(Collectors.toList())); |
|
||||
|
|
||||
List<XmQuestionWorkload> can=new ArrayList<>(); |
|
||||
List<XmQuestionWorkload> no=new ArrayList<>(); |
|
||||
for (XmQuestionWorkload data : datasDb) { |
|
||||
if(true){ |
|
||||
can.add(data); |
|
||||
}else{ |
|
||||
no.add(data); |
|
||||
} |
|
||||
} |
|
||||
List<String> msgs=new ArrayList<>(); |
|
||||
if(can.size()>0){ |
|
||||
xmQuestionWorkloadService.removeByIds(can); |
|
||||
msgs.add(LangTips.transMsg("del-ok-num","成功删除%s条数据.",can.size())); |
|
||||
} |
|
||||
|
|
||||
if(no.size()>0){ |
|
||||
msgs.add(LangTips.transMsg("not-allow-del-num","以下%s条数据不能删除:【%s】",no.size(),no.stream().map(i-> i.getId() ).collect(Collectors.joining(",")))); |
|
||||
} |
|
||||
if(can.size()>0){ |
|
||||
return Result.ok(msgs.stream().collect(Collectors.joining())); |
|
||||
}else { |
|
||||
return Result.error(msgs.stream().collect(Collectors.joining())); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-根据主键查询一条数据",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmQuestionWorkload.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/queryById",method=RequestMethod.GET) |
|
||||
public Result queryById(XmQuestionWorkload xmQuestionWorkload) { |
|
||||
XmQuestionWorkload data = (XmQuestionWorkload) xmQuestionWorkloadService.getById(xmQuestionWorkload); |
|
||||
return Result.ok().setData(data); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -1,155 +0,0 @@ |
|||||
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.*; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import com.mdp.core.entity.Result; |
|
||||
import com.mdp.core.query.QueryTools; |
|
||||
import static com.mdp.core.utils.BaseUtils.*; |
|
||||
import com.mdp.core.entity.Tips; |
|
||||
import com.mdp.core.entity.LangTips; |
|
||||
import com.mdp.core.err.BizException; |
|
||||
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.mdp.swagger.ApiEntityParams; |
|
||||
import io.swagger.annotations.*; |
|
||||
import springfox.documentation.annotations.ApiIgnore; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
|
|
||||
import com.xm.core.service.XmTaskWorkloadService; |
|
||||
import com.xm.core.entity.XmTaskWorkload; |
|
||||
/** |
|
||||
* @author maimeng-mdp code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
@RestController |
|
||||
@RequestMapping(value="/xm/core/xmTaskWorkload") |
|
||||
@Api(tags={"工时登记表-操作接口"}) |
|
||||
public class XmTaskWorkloadController { |
|
||||
|
|
||||
static Logger logger =LoggerFactory.getLogger(XmTaskWorkloadController.class); |
|
||||
|
|
||||
@Autowired |
|
||||
private XmTaskWorkloadService xmTaskWorkloadService; |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-查询列表",notes=" ") |
|
||||
@ApiEntityParams(XmTaskWorkload.class) |
|
||||
@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 Result listXmTaskWorkload(@ApiIgnore @RequestParam Map<String,Object> params){ |
|
||||
User user=LoginUtils.getCurrentUserInfo(); |
|
||||
QueryWrapper<XmTaskWorkload> qw = QueryTools.initQueryWrapper(XmTaskWorkload.class , params); |
|
||||
IPage page=QueryTools.initPage(params); |
|
||||
List<Map<String,Object>> datas = xmTaskWorkloadService.selectListMapByWhere(page,qw,params); |
|
||||
return Result.ok("query-ok","查询成功").setData(datas).setTotal(page.getTotal()); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@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 Result addXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload) { |
|
||||
xmTaskWorkloadService.save(xmTaskWorkload); |
|
||||
return Result.ok("add-ok","添加成功!"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-删除",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") |
|
||||
}) |
|
||||
@RequestMapping(value="/del",method=RequestMethod.POST) |
|
||||
public Result delXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload){ |
|
||||
xmTaskWorkloadService.removeById(xmTaskWorkload); |
|
||||
return Result.ok("del-ok","删除成功!"); |
|
||||
} |
|
||||
|
|
||||
@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 Result editXmTaskWorkload(@RequestBody XmTaskWorkload xmTaskWorkload) { |
|
||||
xmTaskWorkloadService.updateById(xmTaskWorkload); |
|
||||
return Result.ok("edit-ok","修改成功!"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-批量修改某些字段",notes="") |
|
||||
@ApiEntityParams( value = XmTaskWorkload.class, props={ }, remark = "工时登记表", paramType = "body" ) |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmTaskWorkload.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/editSomeFields",method=RequestMethod.POST) |
|
||||
public Result editSomeFields( @ApiIgnore @RequestBody Map<String,Object> params) { |
|
||||
User user= LoginUtils.getCurrentUserInfo(); |
|
||||
xmTaskWorkloadService.editSomeFields(params); |
|
||||
return Result.ok("edit-ok","更新成功"); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-批量删除",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") |
|
||||
}) |
|
||||
@RequestMapping(value="/batchDel",method=RequestMethod.POST) |
|
||||
public Result batchDelXmTaskWorkload(@RequestBody List<XmTaskWorkload> xmTaskWorkloads) { |
|
||||
User user= LoginUtils.getCurrentUserInfo(); |
|
||||
if(xmTaskWorkloads.size()<=0){ |
|
||||
return Result.error("batchDel-data-err-0","请上送待删除数据列表"); |
|
||||
} |
|
||||
List<XmTaskWorkload> datasDb=xmTaskWorkloadService.listByIds(xmTaskWorkloads.stream().map(i-> i.getId() ).collect(Collectors.toList())); |
|
||||
|
|
||||
List<XmTaskWorkload> can=new ArrayList<>(); |
|
||||
List<XmTaskWorkload> no=new ArrayList<>(); |
|
||||
for (XmTaskWorkload data : datasDb) { |
|
||||
if(true){ |
|
||||
can.add(data); |
|
||||
}else{ |
|
||||
no.add(data); |
|
||||
} |
|
||||
} |
|
||||
List<String> msgs=new ArrayList<>(); |
|
||||
if(can.size()>0){ |
|
||||
xmTaskWorkloadService.removeByIds(can); |
|
||||
msgs.add(LangTips.transMsg("del-ok-num","成功删除%s条数据.",can.size())); |
|
||||
} |
|
||||
|
|
||||
if(no.size()>0){ |
|
||||
msgs.add(LangTips.transMsg("not-allow-del-num","以下%s条数据不能删除:【%s】",no.size(),no.stream().map(i-> i.getId() ).collect(Collectors.joining(",")))); |
|
||||
} |
|
||||
if(can.size()>0){ |
|
||||
return Result.ok(msgs.stream().collect(Collectors.joining())); |
|
||||
}else { |
|
||||
return Result.error(msgs.stream().collect(Collectors.joining())); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
@ApiOperation( value = "工时登记表-根据主键查询一条数据",notes=" ") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmTaskWorkload.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/queryById",method=RequestMethod.GET) |
|
||||
public Result queryById(XmTaskWorkload xmTaskWorkload) { |
|
||||
XmTaskWorkload data = (XmTaskWorkload) xmTaskWorkloadService.getById(xmTaskWorkload); |
|
||||
return Result.ok().setData(data); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -1,109 +0,0 @@ |
|||||
package com.xm.core.entity; |
|
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br> |
|
||||
* 实体 XmQuestionTag所有属性名: <br> |
|
||||
* questionId,tagId,tagName,ctime,id;<br> |
|
||||
* 表 XM.xm_question_tag 问题标签关联表的所有字段名: <br> |
|
||||
* question_id,tag_id,tag_name,ctime,id;<br> |
|
||||
* 当前主键(包括多主键):<br> |
|
||||
* id;<br> |
|
||||
*/ |
|
||||
@ApiModel(description="问题标签关联表") |
|
||||
public class XmQuestionTag 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 questionId; |
|
||||
|
|
||||
@ApiModelProperty(notes="标签编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String tagId; |
|
||||
|
|
||||
@ApiModelProperty(notes="标签名称",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String tagName; |
|
||||
|
|
||||
@ApiModelProperty(notes="添加时间",allowEmptyValue=true,example="",allowableValues="") |
|
||||
Date ctime; |
|
||||
|
|
||||
/**主键**/ |
|
||||
public XmQuestionTag(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
/**问题标签关联表**/ |
|
||||
public XmQuestionTag() { |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 问题编号 |
|
||||
**/ |
|
||||
public void setQuestionId(String questionId) { |
|
||||
this.questionId = questionId; |
|
||||
} |
|
||||
/** |
|
||||
* 标签编号 |
|
||||
**/ |
|
||||
public void setTagId(String tagId) { |
|
||||
this.tagId = tagId; |
|
||||
} |
|
||||
/** |
|
||||
* 标签名称 |
|
||||
**/ |
|
||||
public void setTagName(String tagName) { |
|
||||
this.tagName = tagName; |
|
||||
} |
|
||||
/** |
|
||||
* 添加时间 |
|
||||
**/ |
|
||||
public void setCtime(Date ctime) { |
|
||||
this.ctime = ctime; |
|
||||
} |
|
||||
/** |
|
||||
* 主键 |
|
||||
**/ |
|
||||
public void setId(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 问题编号 |
|
||||
**/ |
|
||||
public String getQuestionId() { |
|
||||
return this.questionId; |
|
||||
} |
|
||||
/** |
|
||||
* 标签编号 |
|
||||
**/ |
|
||||
public String getTagId() { |
|
||||
return this.tagId; |
|
||||
} |
|
||||
/** |
|
||||
* 标签名称 |
|
||||
**/ |
|
||||
public String getTagName() { |
|
||||
return this.tagName; |
|
||||
} |
|
||||
/** |
|
||||
* 添加时间 |
|
||||
**/ |
|
||||
public Date getCtime() { |
|
||||
return this.ctime; |
|
||||
} |
|
||||
/** |
|
||||
* 主键 |
|
||||
**/ |
|
||||
public String getId() { |
|
||||
return this.id; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -1,106 +0,0 @@ |
|||||
package com.xm.core.entity; |
|
||||
import lombok.Data; |
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||
import com.mdp.core.dao.annotation.TableIds; |
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||
import org.apache.ibatis.type.Alias; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import java.util.Date; |
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* @author code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("xm_question_workload") |
|
||||
@ApiModel(description="工时登记表") |
|
||||
public class XmQuestionWorkload implements java.io.Serializable { |
|
||||
|
|
||||
private static final long serialVersionUID = 1L; |
|
||||
@TableId(type = IdType.ASSIGN_ID) |
|
||||
|
|
||||
@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 bugId; |
|
||||
|
|
||||
|
|
||||
@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="工时,一个bug可多次提交,小时",allowEmptyValue=true,example="",allowableValues="") |
|
||||
BigDecimal workload; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="项目编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String projectId; |
|
||||
|
|
||||
/** |
|
||||
*主键 |
|
||||
**/ |
|
||||
public XmQuestionWorkload(Integer id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 工时登记表 |
|
||||
**/ |
|
||||
public XmQuestionWorkload() { |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -1,142 +0,0 @@ |
|||||
package com.xm.core.entity; |
|
||||
import lombok.Data; |
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||
import com.mdp.core.dao.annotation.TableIds; |
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||
import org.apache.ibatis.type.Alias; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import java.util.Date; |
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* @author code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("xm_task_workload") |
|
||||
@ApiModel(description="工时登记表") |
|
||||
public class XmTaskWorkload implements java.io.Serializable { |
|
||||
|
|
||||
private static final long serialVersionUID = 1L; |
|
||||
@TableId(type = IdType.ASSIGN_ID) |
|
||||
|
|
||||
@ApiModelProperty(notes="主键,主键",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String 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="") |
|
||||
Date stime; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="结算状态0-无需结算,1-待结算2-已提交3-已通过4-已结算",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String sstatus; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="工时,一个task_id可多次提交,小时",allowEmptyValue=true,example="",allowableValues="") |
|
||||
BigDecimal workload; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="任务剩余工时(同一天取最后日期更新到task表budget_workload中)",allowEmptyValue=true,example="",allowableValues="") |
|
||||
BigDecimal rworkload; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="创建人姓名",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String cusername; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="归属项目",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String projectId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="项目归属机构",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String branchId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="用户归属机构",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String ubranchId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="结算单编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String sbillId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="结算单明细表id",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String detailId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="需求编号,缺陷报工、测试报工、任务报工都可以填",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String menuId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="产品编号,能关联到的都填",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String productId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="测试用例编号(如果是测试执行报工,必填)",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String caseId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="测试计划编号(如果是测试执行报工,必填)",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String planId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="缺陷编号(如果是缺陷报工,必填)",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String bugId; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="报工类型1-任务,2-缺陷,3-测试用例设计,4-测试执行",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String bizType; |
|
||||
|
|
||||
/** |
|
||||
*主键 |
|
||||
**/ |
|
||||
public XmTaskWorkload(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 工时登记表 |
|
||||
**/ |
|
||||
public XmTaskWorkload() { |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -1,28 +0,0 @@ |
|||||
package com.xm.core.mapper; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
|
|
||||
import java.util.List; |
|
||||
import java.util.Map; |
|
||||
|
|
||||
import com.xm.core.entity.XmQuestionWorkload; |
|
||||
/** |
|
||||
* @author maimeng-mdp code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
public interface XmQuestionWorkloadMapper extends BaseMapper<XmQuestionWorkload> { |
|
||||
|
|
||||
/** |
|
||||
* 自定义查询,支持多表关联 |
|
||||
* @param page 分页条件 |
|
||||
* @param ew 一定要,并且必须加@Param("ew")注解 |
|
||||
* @param ext 如果xml中需要根据某些值进行特殊处理,可以通过这个进行传递,非必须,注解也可以不加 |
|
||||
* @return |
|
||||
*/ |
|
||||
List<Map<String,Object>> selectListMapByWhere(IPage page, @Param("ew") QueryWrapper ew,@Param("ext") Map<String,Object> ext); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
@ -1,17 +0,0 @@ |
|||||
<?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.mapper.XmQuestionWorkloadMapper"> |
|
||||
|
|
||||
<select id="selectListMapByWhere" resultType="HashMap"> |
|
||||
select * from xm_question_workload res |
|
||||
<where> |
|
||||
${@com.mdp.Util@trimWhere(ew.customSqlSegment)} |
|
||||
<!--下面可以添加更多查询条件,正常的if 条件都是支持的--> |
|
||||
|
|
||||
</where> |
|
||||
<!--下面双引号内可以添加默认排序,如果前端没有上传排序,将使用引号内的排序规则--> |
|
||||
${@com.mdp.Util@trimOrderBy(ew.customSqlSegment,'')} |
|
||||
<!--下面双引号内可以添加默认分组,如果前端没有上传分组,将使用引号内的分组规则--> |
|
||||
${@com.mdp.Util@trimGroupBy(ew.customSqlSegment,'')} |
|
||||
</select> |
|
||||
</mapper> |
|
||||
@ -1,28 +0,0 @@ |
|||||
package com.xm.core.mapper; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
|
|
||||
import java.util.List; |
|
||||
import java.util.Map; |
|
||||
|
|
||||
import com.xm.core.entity.XmTaskWorkload; |
|
||||
/** |
|
||||
* @author maimeng-mdp code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
public interface XmTaskWorkloadMapper extends BaseMapper<XmTaskWorkload> { |
|
||||
|
|
||||
/** |
|
||||
* 自定义查询,支持多表关联 |
|
||||
* @param page 分页条件 |
|
||||
* @param ew 一定要,并且必须加@Param("ew")注解 |
|
||||
* @param ext 如果xml中需要根据某些值进行特殊处理,可以通过这个进行传递,非必须,注解也可以不加 |
|
||||
* @return |
|
||||
*/ |
|
||||
List<Map<String,Object>> selectListMapByWhere(IPage page, @Param("ew") QueryWrapper ew,@Param("ext") Map<String,Object> ext); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
@ -1,17 +0,0 @@ |
|||||
<?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.mapper.XmTaskWorkloadMapper"> |
|
||||
|
|
||||
<select id="selectListMapByWhere" resultType="HashMap"> |
|
||||
select * from xm_task_workload res |
|
||||
<where> |
|
||||
${@com.mdp.Util@trimWhere(ew.customSqlSegment)} |
|
||||
<!--下面可以添加更多查询条件,正常的if 条件都是支持的--> |
|
||||
|
|
||||
</where> |
|
||||
<!--下面双引号内可以添加默认排序,如果前端没有上传排序,将使用引号内的排序规则--> |
|
||||
${@com.mdp.Util@trimOrderBy(ew.customSqlSegment,'')} |
|
||||
<!--下面双引号内可以添加默认分组,如果前端没有上传分组,将使用引号内的分组规则--> |
|
||||
${@com.mdp.Util@trimGroupBy(ew.customSqlSegment,'')} |
|
||||
</select> |
|
||||
</mapper> |
|
||||
@ -1,36 +0,0 @@ |
|||||
package com.xm.core.service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
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.XmQuestionWorkload; |
|
||||
import com.xm.core.mapper.XmQuestionWorkloadMapper; |
|
||||
/** |
|
||||
* @author maimeng-mdp code-gen |
|
||||
* @since 2023-10-3 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class XmQuestionWorkloadService extends BaseService<XmQuestionWorkloadMapper,XmQuestionWorkload> { |
|
||||
static Logger logger =LoggerFactory.getLogger(XmQuestionWorkloadService.class); |
|
||||
|
|
||||
/** |
|
||||
* 自定义查询,支持多表关联 |
|
||||
* @param page 分页条件 |
|
||||
* @param ew 一定要,并且必须加@Param("ew")注解 |
|
||||
* @param ext 如果xml中需要根据某些值进行特殊处理,可以通过这个进行传递,非必须,注解也可以不加 |
|
||||
* @return |
|
||||
*/ |
|
||||
public List<Map<String,Object>> selectListMapByWhere(IPage page, QueryWrapper ew, Map<String,Object> ext){ |
|
||||
return baseMapper.selectListMapByWhere(page,ew,ext); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue