Commit 21d2501f authored by srx's avatar srx

Merge remote-tracking branch 'origin/developer' into developer

parents 5bba1752 693d31ef
......@@ -29,6 +29,9 @@ public class InstallNoticePageDto extends BaseDto {
@ApiModelProperty(value = "项目安装区域")
private String installRegion;
@ApiModelProperty(value = "项目开工日期")
private String startDate;
@ApiModelProperty(value = "建设单位")
private String constructionUnit;
......@@ -48,10 +51,7 @@ public class InstallNoticePageDto extends BaseDto {
private String chargerPersonId;
@ApiModelProperty(value = "监检机构")
private String inspectionOrgId;
@ApiModelProperty(value = "附件查看")
private Text info;
private String inspectionUnitId;
@ApiModelProperty(value = "告知申请状态")
private String noticeStatus;
......
......@@ -51,4 +51,8 @@ public class WorkHistoryDto extends BaseDto {
@ApiModelProperty(value = "备注")
private String remark;
/**
* 焊工姓名
*/
private String name;
}
......@@ -28,7 +28,7 @@ public interface InstallNoticeMapper extends BaseMapper<InstallNotice> {
InstallNoticePageDto selectById(@Param("sequenceNbr")Long sequenceNbr);
//安装告知申请页面分页列表
Page<InstallNoticePageDto> installNoticePage(IPage<InstallNoticePageDto> page);
Page<InstallNoticePageDto> installNoticePage(IPage<InstallNoticePageDto> page,@RequestParam String name,@RequestParam String constructionUnit);
//根据sequenceNbr查询告知申请详情
InstallNoticeDto selectoneById(@RequestParam("sequenceNbr")Long sequenceNbr );
......
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.WorkHistoryDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.WorkHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.Map;
/**
* 焊工工作履历表 Mapper 接口
*
......@@ -11,4 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface WorkHistoryMapper extends BaseMapper<WorkHistory> {
IPage<WorkHistoryDto> pageList(Page<WorkHistoryDto> page, WorkHistoryDto tzUgpWorkHistory);
}
......@@ -3,13 +3,11 @@
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper">
<!-- 查询安装告知申请列表-->
<select id="installNoticeList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
AND tz_ugp_project.name LIKE '%'|| #{name} || '%' AND construction_unit LIKE '%'|| #{constructionUnit} || '%'
</select>
<!-- 安装告知申请列表按name,unit筛选-->
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
......@@ -36,11 +34,13 @@
<!-- 查询安装告知申请页面-->
<select id="installNoticePage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.sequence_nbr,tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,charge_person,installation_unit,install_pri,supervise_dept_id
,charge_person_id,inspection_unit_id,notice_status,notice_date
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_verify
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr
AND tz_ugp_install_notice.project_id=tz_ugp_verify.project_id
AND tz_ugp_supervise_rule.admin_region_code=tz_ugp_project.install_region_code
AND tz_ugp_project.name LIKE '%${name}%' AND construction_unit LIKE '%${constructionUnit}%'
</select>
......
......@@ -2,4 +2,27 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.WorkHistoryMapper">
<select id="pageList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WorkHistoryDto">
SELECT wh.*,ou.biz_org_name AS name FROM `tz_ugp_work_history` AS wh LEFT JOIN cb_org_usr AS ou ON ou.sequence_nbr = wh.welder_id
<where>
<if test="tzUgpWorkHistory.companyName!='' and tzUgpWorkHistory.companyName!=null">
and wh.company_name like concat("%",#{tzUgpWorkHistory.companyName},"%")
</if>
<if test="tzUgpWorkHistory.name!='' and tzUgpWorkHistory.name!=null">
and ou.biz_org_name like concat("%",#{tzUgpWorkHistory.name},"%")
</if>
<if test="tzUgpWorkHistory.projectName!='' and tzUgpWorkHistory.projectName!=null">
and wh.project_name like concat("%",#{tzUgpWorkHistory.projectName},"%")
</if>
<if test="tzUgpWorkHistory.weldNumber!='' and tzUgpWorkHistory.weldNumber!=null">
and wh.weld_number like concat("%",#{tzUgpWorkHistory.weldNumber},"%")
</if>
<if test="tzUgpWorkHistory.startDate!='' and tzUgpWorkHistory.startDate!=null">
and wh.start_date like concat("%",#{tzUgpWorkHistory.startDate},"%")
</if>
<if test="tzUgpWorkHistory.endDate!='' and tzUgpWorkHistory.endDate!=null">
and wh.end_date like concat("%",#{tzUgpWorkHistory.endDate},"%")
</if>
</where>
</select>
</mapper>
......@@ -120,13 +120,12 @@ public class InstallNoticeController extends BaseController {
@GetMapping(value = "/installNoticePage")
@ApiOperation(httpMethod = "GET", value = "安装告知表分页查询", notes = "安装告知表分页查询")
public ResponseModel<Page<InstallNoticePageDto>> queryForPage1(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
(value = "size") int size,@RequestParam(required = false) String name,@RequestParam(required = false) String constructionUnit) {
Page<InstallNoticePageDto> page = new Page<InstallNoticePageDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(installNoticeServiceImpl.installNoticePage(page));
return ResponseHelper.buildResponse(installNoticeServiceImpl.installNoticePage(page,name,constructionUnit));
}
/**
* 列表全部数据查询
*
......@@ -181,4 +180,20 @@ public class InstallNoticeController extends BaseController {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(installNoticeServiceImpl.updateWithModel(model));
}
/**
* 提交申请
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "Post", value = "根据sequenceNbr更新提交申请", notes = "根据sequenceNbr更新提交申请")
public ResponseModel<InstallNoticeDto> InstallNotice(@RequestBody InstallNoticeDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setProjectId(sequenceNbr);
model.setNoticeStatus("已提交");
model = installNoticeServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
}
......@@ -12,7 +12,10 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.WorkHistoryServiceImpl;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -148,4 +151,18 @@ public class WorkHistoryController extends BaseController {
public ResponseModel<List<WorkHistoryDto>> selectForList() {
return ResponseHelper.buildResponse(workHistoryServiceImpl.queryForWorkHistoryList());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
@GetMapping(value = "/pageList")
public ResponseModel<IPage<WorkHistoryDto>> pageList(String pageNum, String pageSize, WorkHistoryDto tzUgpWorkHistory){
if(ValidationUtil.isEmpty(pageNum)){
pageNum = "1";
}
if(ValidationUtil.isEmpty(pageSize)){
pageNum = "15";
}
Page<WorkHistoryDto> page = new Page(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
return ResponseHelper.buildResponse(workHistoryServiceImpl.pageList(page, tzUgpWorkHistory));
}
}
......@@ -44,8 +44,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
/**
* 安装告知申请分页查询
*/
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page) {
return installNoticeMapper.installNoticePage(page);
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page,String name,String constructionUnit) {
return installNoticeMapper.installNoticePage(page,name,constructionUnit);
}
/**
......
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.ugp.api.entity.WorkHistory;
import com.yeejoin.amos.boot.module.ugp.api.mapper.WorkHistoryMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IWorkHistoryService;
import com.yeejoin.amos.boot.module.ugp.api.dto.WorkHistoryDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.Map;
/**
* 焊工工作履历表服务实现类
......@@ -17,6 +20,9 @@ import java.util.List;
*/
@Service
public class WorkHistoryServiceImpl extends BaseService<WorkHistoryDto,WorkHistory,WorkHistoryMapper> implements IWorkHistoryService {
@Autowired
WorkHistoryMapper workHistoryMapper;
/**
* 分页查询
*/
......@@ -30,4 +36,8 @@ public class WorkHistoryServiceImpl extends BaseService<WorkHistoryDto,WorkHisto
public List<WorkHistoryDto> queryForWorkHistoryList() {
return this.queryForList("" , false);
}
public IPage<WorkHistoryDto> pageList(Page<WorkHistoryDto> page, WorkHistoryDto tzUgpWorkHistory){
return workHistoryMapper.pageList(page, tzUgpWorkHistory);
}
}
\ No newline at end of file
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