提交代码

dev_xds
姜玉琦 2023-08-30 23:59:22 +08:00
parent e70d2f8744
commit 8e0c4fa43f
9 changed files with 282 additions and 7 deletions

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -96,7 +96,8 @@ public class WechatUserLoginController extends BaseController {
*/
@GetMapping("/getOpenId")
public AjaxResult getOpenId(String code,String appId){
return success(wechatUserLoginService.getOpenId(code,appId));
Map<String,Object> data = wechatUserLoginService.getOpenId(code,appId);
return success(data);
}
/**

View File

@ -87,6 +87,8 @@ public class SurProjectMeasure extends BaseEntity
private String projectName;
private String deptName;
private String measureTypeName;
private String measureInfoName;
public void setId(Long id)
{
@ -258,6 +260,22 @@ public class SurProjectMeasure extends BaseEntity
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
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -55,9 +55,11 @@ public class SurProjectMeasureServiceImpl implements ISurProjectMeasureService
@Override
public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure)
{
if(surProjectMeasure.getCreateBy()==null){
surProjectMeasure.setCreateBy(SecurityUtils.getUsername());
}
surProjectMeasure.setMainImage(surProjectMeasure.getImageUrls().split(",")[0]);
surProjectMeasure.setIsDel(PublicStateEnum.OK.getCode());
surProjectMeasure.setCreateBy(SecurityUtils.getUsername());
surProjectMeasure.setCreateTime(DateUtils.getNowDate());
return surProjectMeasureMapper.insertSurProjectMeasure(surProjectMeasure);
}

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.PublicStateEnum;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.file.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -82,8 +83,9 @@ public class SurProjectWorkSpecialServiceImpl implements ISurProjectWorkSpecialS
@Override
public int insertSurProjectWorkSpecial(SurProjectWorkSpecial surProjectWorkSpecial)
{
if(surProjectWorkSpecial.getCreateBy()==null){
surProjectWorkSpecial.setCreateBy(SecurityUtils.getUsername());
//surProjectWorkSpecial.setDeptId(SecurityUtils.getDeptId());
}
surProjectWorkSpecial.setCreateTime(DateUtils.getNowDate());
surProjectWorkSpecial.setCredentialType(FileUtils.getFileLastNameUpCase(surProjectWorkSpecial.getCredentialFile()));
return surProjectWorkSpecialMapper.insertSurProjectWorkSpecial(surProjectWorkSpecial);

View File

@ -29,12 +29,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="measureTypeName" column="measure_type_name" />
<result property="measureInfoName" column="measure_info_name" />
</resultMap>
<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 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>
<select id="selectSurProjectMeasureList" parameterType="SurProjectMeasure" resultMap="SurProjectMeasureResult">

View File

@ -31,7 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<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">
<include refid="selectSurProjectWorkSpecialVo"/>
where id = #{id}
where spwp.id = #{id}
</select>
<insert id="insertSurProjectWorkSpecial" parameterType="SurProjectWorkSpecial" useGeneratedKeys="true" keyProperty="id">