Commit b2dbabeb authored by hubaoshan's avatar hubaoshan

taskinfo

parent 54431915
......@@ -5,30 +5,23 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.ResultHandler;
import org.rcisoft.bus.jnP7sj.entity.jnP7sj;
import org.rcisoft.bus.jnsp7xtm.vo.Jnsp7xtmVo;
import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo;
import java.util.List;
public interface Jnsp7xtmDqsjRepository extends CyBaseMapper<jnP7sj> {
public interface Jnsp7xtmDqsjRepository {
List<jnP7sj> queryjnP7sj(@Param("entity") jnP7sj jnP7sj);
IPage<jnP7sj> queryjnP7Paged(CyPageInfo cyPageInfo, @Param("entity") jnP7sj jnP7sj);
List<String> getMonthList();
/**
* 截断表jnsp7xtm_dqsj信息
**/
void truncateJnsp7xtmDqsj(@Param("shema") String shema);
/**
* 流式查询Jnsp7xtmVo
**/
void streamQuery(@Param("handler") ResultHandler<Jnsp7xtmVo> handler);
/**
* 批量添加 Jnsp7xtmDqsj
**/
void batchAddJnp7sj(@Param("list") List<jnP7sj> list);
}
package org.rcisoft.bus.taskInfo.controller;
public class taskInfoController {
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.bus.taskInfo.entity.taskInfo;
import org.rcisoft.bus.taskInfo.service.taskInfoService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.controller.CyPaginationController;
import org.rcisoft.core.model.CyGridModel;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.rcisoft.core.result.CyResult;
import org.rcisoft.core.util.CyEpExcelUtil;
import org.rcisoft.core.util.CyResultGenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
@RestController
@RequestMapping("/taskInfo")
public class taskInfoController extends CyPaginationController<taskInfo> {
@Autowired
private taskInfoService taskInfoServiceImpl;
@CyOpeLogAnno(title = "system-taskInfo管理-新增taskInfo", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value = "添加taskInfo", notes = "添加taskInfo")
@PostMapping(value = "/add")
public CyResult add(@Valid taskInfo taskInfo, BindingResult bindingResult) {
CyPersistModel data = taskInfoServiceImpl.persist(taskInfo);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
taskInfo);
}
@CyOpeLogAnno(title = "system-?????管理-删除?????", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value = "逻辑删除?????", notes = "逻辑删除?????")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/deleteLogical/{businessId:\\w+}")
public CyResult deleteLogical(@Valid taskInfo taskInfo, BindingResult bindingResult) {
CyPersistModel data = taskInfoServiceImpl.persist(taskInfo);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
taskInfo);
}
@CyOpeLogAnno(title = "system-?????管理-删除?????", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value = "删除?????", notes = "删除?????")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/deleteLogical/{businessId:\\w+}")
public CyResult delete(@Valid taskInfo taskInfo, BindingResult bindingResult) {
CyPersistModel data = taskInfoServiceImpl.persist(taskInfo);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
taskInfo);
}
@CyOpeLogAnno(title = "system-?????管理-修改?????", businessType = CyLogTypeEnum.UPDATE)
@ApiOperation(value = "修改?????", notes = "修改?????")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PutMapping("/update/{businessId:\\w+}")
public CyResult update(@Valid taskInfo taskInfo, BindingResult bindingResult) {
CyPersistModel data = taskInfoServiceImpl.persist(taskInfo);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
taskInfo);
}
@CyOpeLogAnno(title = "system-?????管理-查询?????", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value = "查询单一?????", notes = "查询单一?????")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@GetMapping("/detail/{businessId:\\w+}")
public CyResult detail(@Valid taskInfo taskInfo, BindingResult bindingResult) {
CyPersistModel data = taskInfoServiceImpl.persist(taskInfo);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
taskInfo);
}
@CyOpeLogAnno(title = "system-?????管理-查询?????", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询?????集合", notes="查询?????集合")
@GetMapping(value = "/listAll")
public CyResult listAll(taskInfo taskInfo) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
taskInfoServiceImpl.findAll(taskInfo));
}
@CyOpeLogAnno(title = "system-?????管理-查询?????", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="分页查询?????集合", notes="分页查询?????集合")
@GetMapping(value = "/list")
public CyGridModel listByPagination(taskInfo taskInfo) {
taskInfoServiceImpl.findAllByPagination(getPaginationUtility(), taskInfo);
return getGridModelResponse();
}
@CyOpeLogAnno(title = "system-?????管理-查询?????", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出?????信息", notes = "导出?????信息")
@GetMapping(value = "/export")
public void outTaskInfo(HttpServletResponse response, taskInfo taskInfo, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
String excelName="";
switch(excelId){
case "0": excelName="?????信息.xls";break;
case "1": excelName="?????信息.xlsx";break;
case "2": excelName="?????信息.csv";break;
}
List<taskInfo> taskInfoList = taskInfoServiceImpl.export(taskInfo);
CyEpExcelUtil.exportExcel(taskInfoList, "?????信息", "?????信息", taskInfo.class, excelName, response);
}
}
......@@ -9,8 +9,8 @@ import org.rcisoft.core.model.CyPageInfo;
import java.util.List;
public interface TaskInfoRepository extends CyBaseMapper<taskInfo> {
List<taskInfo> queryTaskInfos(@Param("entity") taskInfo taskInfo);
List<taskInfo> queryTaskInfos(@Param("entity") taskInfo taskInfo);
IPage<taskInfo> queryTaskInfosPaged(CyPageInfo cyPageInfo, @Param("entity") taskInfo taskInfo);
......
......@@ -9,7 +9,7 @@ import org.rcisoft.core.entity.CyIdIncreEntity;
@TableName("task_info")
public class taskInfo extends CyIdIncreEntity<taskInfo> {
@Excel(name = "??id", orderNum = "0", width = 20)
private String taskId;
private String tackId;
@Excel(name = "?? 0:??? 1:???", orderNum = "1", width = 20)
private String status;
@Excel(name = "??", orderNum = "2", width = 20)
......
......@@ -9,7 +9,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="task_id" jdbcType="VARCHAR" property="taskId"/>
<result column="tack_id" jdbcType="VARCHAR" property="tackId"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="type" jdbcType="VARCHAR" property="type"/>
<result column="del_flag" jdbcType="NCHAR" property="delFlag"/>
......@@ -17,17 +17,35 @@
<select id="queryTaskInfos" resultMap="BaseResultMap">
select *from task_info where 1=1
and del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
</if>
<if test="entity."></if>
<if></if>
<if></if>
<if></if>
<if></if>
<if></if>
<if test="entity.flag !=null and entity.flag!= ' ' ">
and flag=#{entity.flag}
</if>
<if test="entity.taskId !=null and entity.tackId != '' ">
and tack_id=#{entity.tackId}
</if>
<if test="entity.status !=null and entity.status !=''">
and status like concat('%',#{entity.status},'%')
</if>
<if test="entity.type !=null and entity.type !=''">
and type like concat('%',#{entity.type},'%')
</if>
ORDER BY business_id DESC
</select>
<select id="queryTaskInfosPaged" resultMap="BaseResultMap">
select *from task_info where 1=1
and del_flag = '0'
<if test="entity.flag !=null and entity.flag!= ' ' ">
and flag=#{entity.flag}
</if>
<if test="entity.taskId !=null and entity.tackId != '' ">
and tack_id=#{entity.tackId}
</if>
<if test="entity.status !=null and entity.status !=''">
and status like concat('%',#{entity.status},'%')
</if>
<if test="entity.type !=null and entity.type !=''">
and type like concat('%',#{entity.type},'%')
</if>
ORDER BY business_id DESC
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment