提交代码
parent
e70d2f8744
commit
8e0c4fa43f
|
@ -0,0 +1,70 @@
|
||||||
|
package com.ruoyi.web.project.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectMaterialSealService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version : V1.0
|
||||||
|
* @ClassName: ProjectMaterialSealController
|
||||||
|
* @Description: 项目材料封样
|
||||||
|
* @Auther: JiangYuQi
|
||||||
|
* @Date: 2020/7/7 18:03
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wechat/projectMaterialSeal")
|
||||||
|
public class ProjectMaterialSealController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISurProjectMaterialSealService surProjectMaterialSealService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目材料封样列表
|
||||||
|
* @param surProjectMaterialSeal
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(SurProjectMaterialSeal surProjectMaterialSeal){
|
||||||
|
if(surProjectMaterialSeal.getDeptId()==0){
|
||||||
|
surProjectMaterialSeal.setDeptId(null);
|
||||||
|
}
|
||||||
|
return success(surProjectMaterialSealService.selectSurProjectMaterialSealList(surProjectMaterialSeal));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询材料封样详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/info")
|
||||||
|
public AjaxResult info(Long id){
|
||||||
|
return success(surProjectMaterialSealService.selectSurProjectMaterialSealById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增材料封样
|
||||||
|
* @param surProjectMaterialSeal
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
@Log(title = "材料封样", businessType = BusinessType.INSERT)
|
||||||
|
public AjaxResult addTrain(@RequestBody SurProjectMaterialSeal surProjectMaterialSeal){
|
||||||
|
return success(surProjectMaterialSealService.insertSurProjectMaterialSeal(surProjectMaterialSeal));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除材料封样
|
||||||
|
*/
|
||||||
|
@Log(title = "材料封样", businessType = BusinessType.DELETE)
|
||||||
|
@GetMapping("/remove")
|
||||||
|
public AjaxResult remove(@RequestParam Long id)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectMaterialSealService.deleteSurProjectMaterialSealById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
package com.ruoyi.web.project.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectMeasureService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version : V1.0
|
||||||
|
* @ClassName: ProjectMeasureController
|
||||||
|
* @Description: 项目实测实量
|
||||||
|
* @Auther: JiangYuQi
|
||||||
|
* @Date: 2020/7/7 18:03
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wechat/projectMeasure")
|
||||||
|
public class ProjectMeasureController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISysDictDataService sysDictDataService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISurProjectMeasureService surProjectMeasureService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目实测实量列表
|
||||||
|
* @param surProjectMeasure
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(SurProjectMeasure surProjectMeasure){
|
||||||
|
if(surProjectMeasure.getDeptId()==0){
|
||||||
|
surProjectMeasure.setDeptId(null);
|
||||||
|
}
|
||||||
|
return success(surProjectMeasureService.selectSurProjectMeasureList(surProjectMeasure));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询实测实量详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/info")
|
||||||
|
public AjaxResult info(Long id){
|
||||||
|
return success(surProjectMeasureService.selectSurProjectMeasureById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增实测实量
|
||||||
|
* @param surProjectMeasure
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
@Log(title = "实测实量", businessType = BusinessType.INSERT)
|
||||||
|
public AjaxResult addTrain(@RequestBody SurProjectMeasure surProjectMeasure){
|
||||||
|
return success(surProjectMeasureService.insertSurProjectMeasure(surProjectMeasure));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除实测实量
|
||||||
|
*/
|
||||||
|
@Log(title = "实测实量", businessType = BusinessType.DELETE)
|
||||||
|
@GetMapping("/remove")
|
||||||
|
public AjaxResult remove(@RequestParam Long id)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectMeasureService.deleteSurProjectMeasureById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询特种人员类型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryDictType")
|
||||||
|
public AjaxResult queryDictType(String type){
|
||||||
|
SysDictData dictData = new SysDictData();
|
||||||
|
dictData.setDictType(type);
|
||||||
|
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||||
|
return success(sysDictDataService.selectDictDataList(dictData));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com.ruoyi.web.project.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectWorkSpecial;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectWorkSpecialService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version : V1.0
|
||||||
|
* @ClassName: ProjectSpecialController
|
||||||
|
* @Description: 项目特种人员
|
||||||
|
* @Auther: JiangYuQi
|
||||||
|
* @Date: 2020/7/7 18:03
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wechat/projectSpecial")
|
||||||
|
public class ProjectSpecialController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISysDictDataService sysDictDataService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISurProjectWorkSpecialService surProjectWorkSpecialService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员列表
|
||||||
|
* @param surProjectWorkSpecial
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(SurProjectWorkSpecial surProjectWorkSpecial){
|
||||||
|
if(surProjectWorkSpecial.getDeptId()==0){
|
||||||
|
surProjectWorkSpecial.setDeptId(null);
|
||||||
|
}
|
||||||
|
return success(surProjectWorkSpecialService.selectSurProjectWorkSpecialList(surProjectWorkSpecial));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询特种人员详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/info")
|
||||||
|
public AjaxResult info(Long id){
|
||||||
|
return success(surProjectWorkSpecialService.selectSurProjectWorkSpecialById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增特种人员
|
||||||
|
* @param surProjectWorkSpecial
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
@Log(title = "特种人员", businessType = BusinessType.INSERT)
|
||||||
|
public AjaxResult addTrain(@RequestBody SurProjectWorkSpecial surProjectWorkSpecial){
|
||||||
|
return success(surProjectWorkSpecialService.insertSurProjectWorkSpecial(surProjectWorkSpecial));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除特种人员
|
||||||
|
*/
|
||||||
|
@Log(title = "特种人员", businessType = BusinessType.DELETE)
|
||||||
|
@GetMapping("/remove")
|
||||||
|
public AjaxResult remove(@RequestParam Long id)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectWorkSpecialService.deleteSurProjectWorkSpecialById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询特种人员类型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/querySpecialType")
|
||||||
|
public AjaxResult querySpecialType(){
|
||||||
|
SysDictData dictData = new SysDictData();
|
||||||
|
dictData.setDictType("project_special_type");
|
||||||
|
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||||
|
return success(sysDictDataService.selectDictDataList(dictData));
|
||||||
|
}
|
||||||
|
}
|
|
@ -96,7 +96,8 @@ public class WechatUserLoginController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getOpenId")
|
@GetMapping("/getOpenId")
|
||||||
public AjaxResult getOpenId(String code,String appId){
|
public AjaxResult getOpenId(String code,String appId){
|
||||||
return success(wechatUserLoginService.getOpenId(code,appId));
|
Map<String,Object> data = wechatUserLoginService.getOpenId(code,appId);
|
||||||
|
return success(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -87,6 +87,8 @@ public class SurProjectMeasure extends BaseEntity
|
||||||
|
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
private String measureTypeName;
|
||||||
|
private String measureInfoName;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
|
@ -258,6 +260,22 @@ public class SurProjectMeasure extends BaseEntity
|
||||||
this.deptName = deptName;
|
this.deptName = deptName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMeasureTypeName() {
|
||||||
|
return measureTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMeasureTypeName(String measureTypeName) {
|
||||||
|
this.measureTypeName = measureTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMeasureInfoName() {
|
||||||
|
return measureInfoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMeasureInfoName(String measureInfoName) {
|
||||||
|
this.measureInfoName = measureInfoName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
@ -55,9 +55,11 @@ public class SurProjectMeasureServiceImpl implements ISurProjectMeasureService
|
||||||
@Override
|
@Override
|
||||||
public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure)
|
public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure)
|
||||||
{
|
{
|
||||||
|
if(surProjectMeasure.getCreateBy()==null){
|
||||||
|
surProjectMeasure.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
}
|
||||||
surProjectMeasure.setMainImage(surProjectMeasure.getImageUrls().split(",")[0]);
|
surProjectMeasure.setMainImage(surProjectMeasure.getImageUrls().split(",")[0]);
|
||||||
surProjectMeasure.setIsDel(PublicStateEnum.OK.getCode());
|
surProjectMeasure.setIsDel(PublicStateEnum.OK.getCode());
|
||||||
surProjectMeasure.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
surProjectMeasure.setCreateTime(DateUtils.getNowDate());
|
surProjectMeasure.setCreateTime(DateUtils.getNowDate());
|
||||||
return surProjectMeasureMapper.insertSurProjectMeasure(surProjectMeasure);
|
return surProjectMeasureMapper.insertSurProjectMeasure(surProjectMeasure);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUtils;
|
import com.ruoyi.common.utils.file.FileUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -82,8 +83,9 @@ public class SurProjectWorkSpecialServiceImpl implements ISurProjectWorkSpecialS
|
||||||
@Override
|
@Override
|
||||||
public int insertSurProjectWorkSpecial(SurProjectWorkSpecial surProjectWorkSpecial)
|
public int insertSurProjectWorkSpecial(SurProjectWorkSpecial surProjectWorkSpecial)
|
||||||
{
|
{
|
||||||
|
if(surProjectWorkSpecial.getCreateBy()==null){
|
||||||
surProjectWorkSpecial.setCreateBy(SecurityUtils.getUsername());
|
surProjectWorkSpecial.setCreateBy(SecurityUtils.getUsername());
|
||||||
//surProjectWorkSpecial.setDeptId(SecurityUtils.getDeptId());
|
}
|
||||||
surProjectWorkSpecial.setCreateTime(DateUtils.getNowDate());
|
surProjectWorkSpecial.setCreateTime(DateUtils.getNowDate());
|
||||||
surProjectWorkSpecial.setCredentialType(FileUtils.getFileLastNameUpCase(surProjectWorkSpecial.getCredentialFile()));
|
surProjectWorkSpecial.setCredentialType(FileUtils.getFileLastNameUpCase(surProjectWorkSpecial.getCredentialFile()));
|
||||||
return surProjectWorkSpecialMapper.insertSurProjectWorkSpecial(surProjectWorkSpecial);
|
return surProjectWorkSpecialMapper.insertSurProjectWorkSpecial(surProjectWorkSpecial);
|
||||||
|
|
|
@ -29,12 +29,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="measureTypeName" column="measure_type_name" />
|
||||||
|
<result property="measureInfoName" column="measure_info_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectMeasureVo">
|
<sql id="selectSurProjectMeasureVo">
|
||||||
select spm.id, spm.project_id, spm.dept_id, spm.main_image, spm.image_urls, spm.measure_type, spm.measure_position, spm.measure_info, spm.measure_time, spm.measure_point_position, spm.measure_result, spm.measure_files, spm.quality_user, spm.quality_user_name, spm.supervise_user, spm.supervise_user_name, spm.is_del, spm.create_by, spm.create_time, spm.update_by, spm.update_time, spm.remark, sp.projectName, sd.dept_name from sur_project_measure spm
|
select spm.id, spm.project_id, spm.dept_id, spm.main_image, spm.image_urls, spm.measure_type, sdd1.dict_label as measure_type_name, spm.measure_position, spm.measure_info, sdd2.dict_label as measure_info_name, spm.measure_time, spm.measure_point_position, spm.measure_result, spm.measure_files, spm.quality_user, spm.quality_user_name, spm.supervise_user, spm.supervise_user_name, spm.is_del, spm.create_by, spm.create_time, spm.update_by, spm.update_time, spm.remark, sp.projectName, sd.dept_name from sur_project_measure spm
|
||||||
left join sur_project sp on spm.project_id = sp.id
|
left join sur_project sp on spm.project_id = sp.id
|
||||||
left join sys_dept sd on sd.dept_id = spm.dept_id
|
left join sys_dept sd on sd.dept_id = spm.dept_id
|
||||||
|
left join sys_dict_data sdd1 on sdd1.dict_type = 'project_measure_type' and sdd1.dict_value = spm.measure_type
|
||||||
|
left join sys_dict_data sdd2 on sdd2.dict_type = 'project_measure_info_type' and sdd2.dict_value = spm.measure_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSurProjectMeasureList" parameterType="SurProjectMeasure" resultMap="SurProjectMeasureResult">
|
<select id="selectSurProjectMeasureList" parameterType="SurProjectMeasure" resultMap="SurProjectMeasureResult">
|
||||||
|
|
|
@ -31,7 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectWorkSpecialVo">
|
<sql id="selectSurProjectWorkSpecialVo">
|
||||||
select id, project_id, dept_id, special_type, name, sex, age, phone_number, id_number, is_credential, credential_number, credential_expiration_time, credential_file, credential_type, is_del, create_by, create_time, update_by, update_time, remark from sur_project_work_special
|
select spwp.id, spwp.project_id, spwp.dept_id, spwp.special_type, sdd.dict_label as special_type_name, spwp.name, spwp.sex, spwp.age, spwp.phone_number, spwp.id_number, spwp.is_credential, spwp.credential_number, spwp.credential_expiration_time, spwp.credential_file, spwp.credential_type, spwp.is_del, spwp.create_by, spwp.create_time, spwp.update_by, spwp.update_time, spwp.remark, sp.projectName, sd.dept_name from sur_project_work_special spwp
|
||||||
|
left join sur_project sp on sp.id = spwp.project_id
|
||||||
|
left join sys_dept sd on sd.dept_id = spwp.dept_id
|
||||||
|
left join sys_dict_data sdd on sdd.dict_type = 'project_special_type' and sdd.dict_value = spwp.special_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSurProjectWorkSpecialList" parameterType="SurProjectWorkSpecial" resultMap="SurProjectWorkSpecialResult">
|
<select id="selectSurProjectWorkSpecialList" parameterType="SurProjectWorkSpecial" resultMap="SurProjectWorkSpecialResult">
|
||||||
|
@ -175,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectSurProjectWorkSpecialById" parameterType="Long" resultMap="SurProjectWorkSpecialResult">
|
<select id="selectSurProjectWorkSpecialById" parameterType="Long" resultMap="SurProjectWorkSpecialResult">
|
||||||
<include refid="selectSurProjectWorkSpecialVo"/>
|
<include refid="selectSurProjectWorkSpecialVo"/>
|
||||||
where id = #{id}
|
where spwp.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSurProjectWorkSpecial" parameterType="SurProjectWorkSpecial" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertSurProjectWorkSpecial" parameterType="SurProjectWorkSpecial" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
Loading…
Reference in New Issue