提交代码

dev_xds
姜玉琦 2023-09-03 14:07:36 +08:00
parent 2cd263f9cc
commit 7a8ab8829e
54 changed files with 787 additions and 52 deletions

View File

@ -273,10 +273,7 @@
<el-input v-model="form.insuranceNumber" placeholder="请输入保保单号" />
</el-form-item>
<el-form-item label="保险合同" prop="insuranceFile">
<file-upload
v-model="form.insuranceFile"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
<file-upload v-model="form.insuranceFile" :fileType="['pdf']" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />

View File

@ -144,11 +144,7 @@
<el-input v-model="form.insuranceNumber" placeholder="请输入保险单号" />
</el-form-item>
<el-form-item label="保险合同" prop="insuranceFile">
<file-upload
v-model="form.insuranceFile"
:limit="1"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
<file-upload v-model="form.insuranceFile" :limit="1" :fileType="['pdf']" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />

View File

@ -1,6 +1,7 @@
package com.ruoyi.web.common;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
@ -9,11 +10,15 @@ import com.ruoyi.framework.config.ServerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -115,4 +120,33 @@ public class CommonController
}
}
/**
*
*/
@GetMapping("/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
try
{
if (!FileUtils.checkAllowDownload(resource))
{
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
}
// 本地资源路径
String localPath = RuoYiConfig.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
}

View File

@ -30,6 +30,9 @@ public class ProjectCheckingController extends BaseController {
*/
@GetMapping("/list")
public AjaxResult list(SurProjectChecking surProjectChecking){
if(surProjectChecking.getDeptId()==0){
surProjectChecking.setDeptId(null);
}
return success(surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking));
}
@ -64,4 +67,13 @@ public class ProjectCheckingController extends BaseController {
return toAjax(surProjectCheckingService.deleteSurProjectCheckingById(id));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/findStatisticsByProjectId")
public AjaxResult findStatisticsByProjectId(Long projectId){
return success(surProjectCheckingService.findStatisticsByProjectId(projectId));
}
}

View File

@ -0,0 +1,80 @@
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.SurProjectDeptWroks;
import com.yanzhu.jh.project.service.ISurProjectDeptWroksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @version : V1.0
* @ClassName: ProjectDeptWroksController
* @Description:
* @Auther: JiangYuQi
* @Date: 2020/7/7 18:03
*/
@RestController
@RequestMapping("/wechat/projectDeptWroks")
public class ProjectDeptWroksController extends BaseController {
@Autowired
private ISurProjectDeptWroksService surProjectDeptWroksService;
/**
*
* @param surProjectDeptWroks
* @return
*/
@GetMapping("/list")
public AjaxResult list(SurProjectDeptWroks surProjectDeptWroks){
if(surProjectDeptWroks.getDeptId()==0){
surProjectDeptWroks.setDeptId(null);
}
return success(surProjectDeptWroksService.selectSurProjectDeptWroksList(surProjectDeptWroks));
}
/**
*
* @param id
* @return
*/
@GetMapping("/info")
public AjaxResult info(Long id){
return success(surProjectDeptWroksService.selectSurProjectDeptWroksById(id));
}
/**
*
* @param surProjectDeptWroks
* @return
*/
@PostMapping("/add")
@Log(title = "在岗人员", businessType = BusinessType.INSERT)
public AjaxResult add(@RequestBody SurProjectDeptWroks surProjectDeptWroks){
return success(surProjectDeptWroksService.deleteInsertProjectDeptWroks(surProjectDeptWroks));
}
/**
*
*/
@Log(title = "在岗人员", businessType = BusinessType.DELETE)
@GetMapping("/remove")
public AjaxResult remove(@RequestParam Long id)
{
return toAjax(surProjectDeptWroksService.deleteSurProjectDeptWroksById(id));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/findSumByProjectId")
public AjaxResult findSumByProjectId(Long projectId){
return success(surProjectDeptWroksService.findSumByProjectId(projectId));
}
}

View File

@ -98,7 +98,7 @@ public class ProjectDetectionController extends BaseController {
}
/**
*
*
* @return
*/
@GetMapping("/queryType")
@ -108,4 +108,14 @@ public class ProjectDetectionController extends BaseController {
dictData.setStatus(PublicStateEnum.OK.getCode());
return success(sysDictDataService.selectDictDataList(dictData));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(Long projectId){
return success(surProjectCheckDetectionService.findGroupCountByProjectId(projectId));
}
}

View File

@ -0,0 +1,97 @@
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.SurProjectInsurance;
import com.yanzhu.jh.project.service.ISurProjectInsuranceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @version : V1.0
* @ClassName: ProjectInsuranceController
* @Description:
* @Auther: JiangYuQi
* @Date: 2020/7/7 18:03
*/
@RestController
@RequestMapping("/wechat/projectInsurance")
public class ProjectInsuranceController extends BaseController {
@Autowired
ISysDictDataService sysDictDataService;
@Autowired
private ISurProjectInsuranceService surProjectInsuranceService;
/**
*
* @param surProjectInsurance
* @return
*/
@GetMapping("/list")
public AjaxResult list(SurProjectInsurance surProjectInsurance){
if(surProjectInsurance.getDeptId()==0){
surProjectInsurance.setDeptId(null);
}
return success(surProjectInsuranceService.selectSurProjectInsuranceList(surProjectInsurance));
}
/**
*
* @param id
* @return
*/
@GetMapping("/info")
public AjaxResult info(Long id){
return success(surProjectInsuranceService.selectSurProjectInsuranceById(id));
}
/**
*
* @param surProjectInsurance
* @return
*/
@PostMapping("/add")
@Log(title = "项目保险", businessType = BusinessType.INSERT)
public AjaxResult add(@RequestBody SurProjectInsurance surProjectInsurance){
return success(surProjectInsuranceService.insertSurProjectInsurance(surProjectInsurance));
}
/**
*
*/
@Log(title = "项目保险", businessType = BusinessType.DELETE)
@GetMapping("/remove")
public AjaxResult remove(@RequestParam Long id)
{
return toAjax(surProjectInsuranceService.deleteSurProjectInsuranceById(id));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(Long projectId){
return success(surProjectInsuranceService.findGroupCountByProjectId(projectId));
}
/**
*
* @return
*/
@GetMapping("/queryInsuranceType")
public AjaxResult queryInsuranceType(){
SysDictData dictData = new SysDictData();
dictData.setDictType("sur_project_insurance_type");
dictData.setStatus(PublicStateEnum.OK.getCode());
return success(sysDictDataService.selectDictDataList(dictData));
}
}

View File

@ -67,4 +67,13 @@ public class ProjectMaterialSealController extends BaseController {
return toAjax(surProjectMaterialSealService.deleteSurProjectMaterialSealById(id));
}
/**
* 使
* @param projectId
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(Long projectId){
return success(surProjectMaterialSealService.findGroupCountByProjectId(projectId));
}
}

View File

@ -59,7 +59,7 @@ public class ProjectMeasureController extends BaseController {
*/
@PostMapping("/add")
@Log(title = "实测实量", businessType = BusinessType.INSERT)
public AjaxResult addTrain(@RequestBody SurProjectMeasure surProjectMeasure){
public AjaxResult add(@RequestBody SurProjectMeasure surProjectMeasure){
return success(surProjectMeasureService.insertSurProjectMeasure(surProjectMeasure));
}
@ -85,4 +85,14 @@ public class ProjectMeasureController extends BaseController {
return success(sysDictDataService.selectDictDataList(dictData));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(Long projectId){
return success(surProjectMeasureService.findGroupCountByProjectId(projectId));
}
}

View File

@ -13,7 +13,6 @@ import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
import com.yanzhu.jh.trouble.service.ISmzSspAuditinfoService;
import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
/**
@ -43,6 +42,8 @@ public class ProjectProblemmodifyController extends BaseController {
*/
@GetMapping("/list")
public AjaxResult list(SmzSspProblemmodify smzSspProblemmodify){
//启用分页
startPage();
return success(smzSspProblemmodifyService.selectWechatSmzSspProblemmodifyList(smzSspProblemmodify));
}
@ -142,6 +143,15 @@ public class ProjectProblemmodifyController extends BaseController {
return success(sysDictDataService.selectDictDataList(dictData));
}
/**
*
* @param smzSspProblemmodify
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(SmzSspProblemmodify smzSspProblemmodify){
return success(smzSspProblemmodifyService.findGroupCountByProjectId(smzSspProblemmodify));
}
}

View File

@ -59,7 +59,7 @@ public class ProjectSpecialController extends BaseController {
*/
@PostMapping("/add")
@Log(title = "特种人员", businessType = BusinessType.INSERT)
public AjaxResult addTrain(@RequestBody SurProjectWorkSpecial surProjectWorkSpecial){
public AjaxResult add(@RequestBody SurProjectWorkSpecial surProjectWorkSpecial){
return success(surProjectWorkSpecialService.insertSurProjectWorkSpecial(surProjectWorkSpecial));
}
@ -84,4 +84,14 @@ public class ProjectSpecialController extends BaseController {
dictData.setStatus(PublicStateEnum.OK.getCode());
return success(sysDictDataService.selectDictDataList(dictData));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(Long projectId){
return success(surProjectWorkSpecialService.findGroupCountByProjectId(projectId));
}
}

View File

@ -101,4 +101,14 @@ public class ProjectTrainController extends BaseController {
{
return success(surProjectUnitInfoService.selectSurProjectUnitInfoList(surProjectUnitInfo));
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/selectGroupCountByProjectId")
public AjaxResult selectGroupCountByProjectId(Long projectId){
return success(workTrainService.findGroupCountByProjectId(projectId));
}
}

View File

@ -102,12 +102,12 @@ public class WechatUserLoginController extends BaseController {
/**
*
* @param username
* @param map
* @return
*/
@GetMapping("/selectRoleMenuList")
public AjaxResult selectRoleMenuList(String username){
return success(wechatUserLoginService.selectRoleMenuList(username));
public AjaxResult selectRoleMenuList(@RequestParam Map<String,Object> map){
return success(wechatUserLoginService.selectRoleMenuList(map));
}
/**

View File

@ -70,9 +70,9 @@ public interface WechatUserLoginMapper {
/**
*
* @param username
* @param map
* @return
*/
public List<Map<String,Object>> selectRoleMenuList(String username);
public List<Map<String,Object>> selectRoleMenuList(Map<String,Object> map);
}

View File

@ -43,10 +43,10 @@ public interface IWechatUserLoginService {
/**
*
* @param username
* @param map
* @return
*/
public List<Map<String,Object>> selectRoleMenuList(String username);
public List<Map<String,Object>> selectRoleMenuList(Map<String,Object> map);
/**
*

View File

@ -180,12 +180,12 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
/**
*
* @param username
* @param map
* @return
*/
@Override
public List<Map<String,Object>> selectRoleMenuList(String username) {
return wechatUserLoginMapper.selectRoleMenuList(username);
public List<Map<String,Object>> selectRoleMenuList(Map<String,Object> map) {
return wechatUserLoginMapper.selectRoleMenuList(map);
}
@Override

View File

@ -128,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
smc.del_flag = 0
AND su.phonenumber = #{username}
<if test="type != null and type != ''"> and smc.menu_type=#{type}</if>
order by smc.menu_sort asc
</select>

View File

@ -77,4 +77,12 @@ public interface SurProjectCheckDetectionMapper
*/
public List<Map<String,Object>> queryGroupCount(SurProjectCheckDetection surProjectCheckDetection);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -76,4 +76,12 @@ public interface SurProjectCheckingMapper
* @return
*/
public int deleteSurProjectCheckingByIds(Long[] ids);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findStatisticsByProjectId(Long projectId);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.mapper;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectDeptWroks;
/**
@ -84,6 +86,14 @@ public interface SurProjectDeptWroksMapper
*/
public int deleteSurProjectDeptWroksById(Long id);
/**
*
*
* @param surProjectDeptWroks
* @return
*/
public int deleteSurProjectDeptWroksByParam(SurProjectDeptWroks surProjectDeptWroks);
/**
*
*
@ -91,4 +101,12 @@ public interface SurProjectDeptWroksMapper
* @return
*/
public int deleteSurProjectDeptWroksByIds(Long[] ids);
/**
*
*
* @param projectId
* @return
*/
public Map<String,Object> findSumByProjectId(Long projectId);
}

View File

@ -91,4 +91,12 @@ public interface SurProjectInsuranceMapper
* @return
*/
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long projectId);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.mapper;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
/**
@ -59,5 +61,13 @@ public interface SurProjectMaterialSealMapper
*/
public int deleteSurProjectMaterialSealByIds(Long[] ids);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
public List<SurProjectMaterialSeal> selectTop20(SurProjectMaterialSeal where);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.mapper;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectMeasure;
/**
@ -59,5 +61,13 @@ public interface SurProjectMeasureMapper
*/
public int deleteSurProjectMeasureByIds(Long[] ids);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where);
}

View File

@ -84,4 +84,12 @@ public interface SurProjectWorkSpecialMapper
* @return
*/
public int deleteSurProjectWorkSpecialByIds(Long[] ids);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -76,4 +76,12 @@ public interface ISurProjectCheckDetectionService
* @return
*/
public Map<String,Object> queryGroupCount(SurProjectCheckDetection surProjectCheckDetection);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -76,4 +76,12 @@ public interface ISurProjectCheckingService
* @return
*/
public int deleteSurProjectCheckingById(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findStatisticsByProjectId(Long projectId);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectDeptWroks;
/**
@ -59,6 +61,14 @@ public interface ISurProjectDeptWroksService
*/
public int updateSurProjectDeptWroks(SurProjectDeptWroks surProjectDeptWroks);
/**
*
*
* @param surProjectDeptWroks
* @return
*/
public int deleteInsertProjectDeptWroks(SurProjectDeptWroks surProjectDeptWroks);
/**
*
*
@ -74,4 +84,12 @@ public interface ISurProjectDeptWroksService
* @return
*/
public int deleteSurProjectDeptWroksById(Long id);
/**
*
*
* @param projectId
* @return
*/
public Map<String,Object> findSumByProjectId(Long projectId);
}

View File

@ -83,4 +83,12 @@ public interface ISurProjectInsuranceService
* @return
*/
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
/**
@ -59,5 +61,13 @@ public interface ISurProjectMaterialSealService
*/
public int deleteSurProjectMaterialSealById(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
public List<SurProjectMaterialSeal> selectTop20(SurProjectMaterialSeal where);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.project.domain.SurProjectMeasure;
/**
@ -59,5 +61,13 @@ public interface ISurProjectMeasureService
*/
public int deleteSurProjectMeasureById(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where);
}

View File

@ -75,4 +75,12 @@ public interface ISurProjectWorkSpecialService
* @return
*/
public int deleteSurProjectWorkSpecialById(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -123,6 +123,7 @@ public class SurProjectCheckDetectionServiceImpl implements ISurProjectCheckDete
* @param surProjectCheckDetection
* @return
*/
@Override
public Map<String,Object> queryGroupCount(SurProjectCheckDetection surProjectCheckDetection){
List<Map<String, Object>> dataList = surProjectCheckDetectionMapper.queryGroupCount(surProjectCheckDetection);
Map<String, Object> dataMap = new HashMap<>();
@ -133,4 +134,15 @@ public class SurProjectCheckDetectionServiceImpl implements ISurProjectCheckDete
}
return dataMap;
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId){
return surProjectCheckDetectionMapper.findGroupCountByProjectId(projectId);
}
}

View File

@ -146,4 +146,15 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
{
return surProjectCheckingMapper.deleteSurProjectCheckingById(id);
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findStatisticsByProjectId(Long projectId) {
return surProjectCheckingMapper.findStatisticsByProjectId(projectId);
}
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.project.service.impl;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -107,6 +109,24 @@ public class SurProjectDeptWroksServiceImpl implements ISurProjectDeptWroksServi
}
}
/**
*
*
* @param surProjectDeptWroks
* @return
*/
@Override
@Transactional
public int deleteInsertProjectDeptWroks(SurProjectDeptWroks surProjectDeptWroks)
{
surProjectDeptWroksMapper.deleteSurProjectDeptWroksByParam(surProjectDeptWroks);
if(surProjectDeptWroks.getCreateBy()==null){
surProjectDeptWroks.setCreateBy(SecurityUtils.getUsername());
}
surProjectDeptWroks.setCreateTime(DateUtils.getNowDate());
return surProjectDeptWroksMapper.insertSurProjectDeptWroks(surProjectDeptWroks);
}
/**
*
*
@ -130,4 +150,14 @@ public class SurProjectDeptWroksServiceImpl implements ISurProjectDeptWroksServi
{
return surProjectDeptWroksMapper.deleteSurProjectDeptWroksById(id);
}
/**
*
*
* @param projectId
* @return
*/
public Map<String,Object> findSumByProjectId(Long projectId) {
return surProjectDeptWroksMapper.findSumByProjectId(projectId);
}
}

View File

@ -82,11 +82,12 @@ public class SurProjectInsuranceServiceImpl implements ISurProjectInsuranceServi
@Transactional
public int insertSurProjectInsurance(SurProjectInsurance surProjectInsurance)
{
surProjectInsurance.setCreateBy(SecurityUtils.getUsername());
if(surProjectInsurance.getCreateBy()==null){
surProjectInsurance.setCreateBy(SecurityUtils.getUsername());
}
surProjectInsurance.setCreateTime(DateUtils.getNowDate());
surProjectInsurance.setInsuranceState(PublicStateEnum.YES.getCode());
surProjectInsurance.setIsDel(PublicStateEnum.OK.getCode());
surProjectInsurance.setIsDel("0");
int res = -1;
//效验保险是否已办理
int total = surProjectInsuranceMapper.findInsuranceByParams(surProjectInsurance);
@ -143,4 +144,15 @@ public class SurProjectInsuranceServiceImpl implements ISurProjectInsuranceServi
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long projectId) {
return surProjectInsuranceMapper.selectProjectInsuranceListByProjectId(projectId);
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId){
return surProjectInsuranceMapper.findGroupCountByProjectId(projectId);
}
}

View File

@ -1,6 +1,7 @@
package com.yanzhu.jh.project.service.impl;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.enums.PublicStateEnum;
import com.ruoyi.common.utils.DateUtils;
@ -103,6 +104,17 @@ public class SurProjectMaterialSealServiceImpl implements ISurProjectMaterialSea
return surProjectMaterialSealMapper.deleteSurProjectMaterialSealById(id);
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId) {
return surProjectMaterialSealMapper.findGroupCountByProjectId(projectId);
}
@Override
public List<SurProjectMaterialSeal> selectTop20(SurProjectMaterialSeal where) {
return surProjectMaterialSealMapper.selectTop20(where);

View File

@ -1,6 +1,7 @@
package com.yanzhu.jh.project.service.impl;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.enums.PublicStateEnum;
import com.ruoyi.common.utils.DateUtils;
@ -103,6 +104,16 @@ public class SurProjectMeasureServiceImpl implements ISurProjectMeasureService
return surProjectMeasureMapper.deleteSurProjectMeasureById(id);
}
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId) {
return surProjectMeasureMapper.findGroupCountByProjectId(projectId);
}
@Override
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where) {
return surProjectMeasureMapper.groupMeasureInfo(where);

View File

@ -129,4 +129,15 @@ public class SurProjectWorkSpecialServiceImpl implements ISurProjectWorkSpecialS
{
return surProjectWorkSpecialMapper.deleteSurProjectWorkSpecialById(id);
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId) {
return surProjectWorkSpecialMapper.findGroupCountByProjectId(projectId);
}
}

View File

@ -112,6 +112,10 @@ public class SmzSspProblemmodify extends BaseEntity
@Excel(name = "创建人")
private String createUser;
/** 检查类型 */
@Excel(name = "检查类型")
private String problemType;
private String createUserName;
/** 修改人 */
@ -426,6 +430,14 @@ public class SmzSspProblemmodify extends BaseEntity
this.flag = flag;
}
public String getProblemType() {
return problemType;
}
public void setProblemType(String problemType) {
this.problemType = problemType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -113,6 +113,14 @@ public interface SmzSspProblemmodifyMapper
*/
public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where);
/**
*
*
* @param smzSspProblemmodify
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(SmzSspProblemmodify smzSspProblemmodify);
/**
*
* @param where startDate endDate

View File

@ -95,6 +95,14 @@ public interface ISmzSspProblemmodifyService
*/
public List<SmzSspProblemmodify> selectSummary(SmzSspProblemmodifyWhere where);
/**
*
*
* @param smzSspProblemmodify
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(SmzSspProblemmodify smzSspProblemmodify);
/**
* ()
* @param deptId 0

View File

@ -263,4 +263,14 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
}
}
/**
*
*
* @param smzSspProblemmodify
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(SmzSspProblemmodify smzSspProblemmodify){
return smzSspProblemmodifyMapper.findGroupCountByProjectId(smzSspProblemmodify);
}
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.work.mapper;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.work.domain.WorkTrain;
import com.yanzhu.jh.work.domain.WorkTrainDept;
@ -108,4 +110,12 @@ public interface WorkTrainMapper
* @return
*/
public int deleteWorkTrainDeptByTrainId(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.work.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.jh.work.domain.WorkTrain;
/**
@ -82,4 +84,12 @@ public interface IWorkTrainService
* @return
*/
public int deleteWorkTrainById(Long id);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
}

View File

@ -13,6 +13,8 @@ import com.yanzhu.jh.project.mapper.SurProjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Map;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import com.yanzhu.jh.work.domain.WorkTrainDept;
@ -207,4 +209,15 @@ public class WorkTrainServiceImpl implements IWorkTrainService
}
}
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId) {
return workTrainMapper.findGroupCountByProjectId(projectId);
}
}

View File

@ -111,6 +111,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="findGroupCountByProjectId" parameterType="Long" resultType="map">
select spcd.check_type as checkType,sdd.dict_label as checkTypeName, count(1) as total,checks.checkTotal,pass.passTotal from sur_project_check_detection spcd
left join sys_dict_data sdd on sdd.dict_type='check_detection_check_type' and sdd.dict_value = spcd.check_type
left join (select cd1.check_type as checks,count(1) as checkTotal from sur_project_check_detection cd1 where cd1.project_id=#{projectId} and cd1.check_state = '2' and cd1.is_del=0 GROUP BY cd1.check_type)checks on checks.checks=spcd.check_type
left join (select cd2.check_type as pass,count(1) as passTotal from sur_project_check_detection cd2 where cd2.project_id=#{projectId} and cd2.detection_result = '1' and cd2.is_del=0 GROUP BY cd2.check_type)pass on pass.pass=spcd.check_type
where spcd.project_id=#{projectId} and spcd.is_del=0
GROUP BY spcd.check_type
</select>
<select id="selectSurProjectCheckDetectionById" parameterType="Long" resultMap="SurProjectCheckDetectionResult">
<include refid="selectSurProjectCheckDetectionVo"/>
where spcd.id = #{id}

View File

@ -137,6 +137,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept sd on sd.dept_id = spc.dept_id
where spc.id = #{id}
</select>
<select id="findStatisticsByProjectId" parameterType="Long" resultType="map">
SELECT
spc.project_id,
count(1) AS total,
pass.pass
FROM
sur_project_checking spc
LEFT JOIN (
SELECT
pass.project_id,
count(1) AS pass
FROM
sur_project_checking pass
WHERE
pass.is_del = 0
AND pass.check_result = '1'
AND pass.project_id = #{projectId}
GROUP BY
pass.project_id
) pass ON pass.project_id = spc.project_id
WHERE
is_del = 0
AND spc.project_id = #{projectId}
GROUP BY
spc.project_id
</select>
<insert id="insertSurProjectChecking" parameterType="SurProjectChecking" useGeneratedKeys="true" keyProperty="id">
insert into sur_project_checking

View File

@ -21,14 +21,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSurProjectDeptWroksVo">
select id, project_id, dept_id, service_personnel, supervisor_personnel, contractor_personnel, create_by, create_time, update_by, update_time, remark from sur_project_dept_wroks
select dw.id, dw.project_id, dw.dept_id, d.dept_name, dw.service_personnel, dw.supervisor_personnel, dw.contractor_personnel, dw.create_by, dw.create_time, dw.update_by, dw.update_time, dw.remark from sur_project_dept_wroks dw
left join sys_dept d on d.dept_id=dw.dept_id
</sql>
<select id="selectSurProjectDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
<include refid="selectSurProjectDeptWroksVo"/>
<where>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="projectId != null "> and dw.project_id = #{projectId}</if>
<if test="deptId != null "> and dw.dept_id = #{deptId}</if>
</where>
</select>
@ -58,6 +59,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="findSumByProjectId" parameterType="Long" resultType="map">
SELECT
SUM(spdw.contractor_personnel) as contractorPersonnel,
SUM(spdw.service_personnel) as servicePersonnel,
SUM(spdw.supervisor_personnel) as supervisorPersonnel
FROM
sur_project_dept_wroks spdw
WHERE
spdw.is_del=0
AND spdw.project_id = #{projectId}
GROUP BY
spdw.project_id
</select>
<select id="selectBgscreenDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
SELECT
<if test="projectId != null ">spdw.project_id,</if>
@ -79,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSurProjectDeptWroksById" parameterType="Long" resultMap="SurProjectDeptWroksResult">
<include refid="selectSurProjectDeptWroksVo"/>
where id = #{id}
where dw.id = #{id}
</select>
<insert id="insertSurProjectDeptWroks" parameterType="SurProjectDeptWroks" useGeneratedKeys="true" keyProperty="id">
@ -131,6 +146,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from sur_project_dept_wroks where id = #{id}
</delete>
<delete id="deleteSurProjectDeptWroksByParam" parameterType="SurProjectDeptWroks">
delete from sur_project_dept_wroks where project_id = #{projectId} and dept_id = #{deptId}
</delete>
<delete id="deleteSurProjectDeptWroksByIds" parameterType="String">
delete from sur_project_dept_wroks where id in
<foreach item="id" collection="array" open="(" separator="," close=")">

View File

@ -27,7 +27,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSurProjectInsuranceVo">
select id, project_id, dept_id, insurance_type, insurance_number, insurance_file, insurance_state, begin_date, end_date, company_name, is_del, create_by, create_time, update_by, update_time, remark from sur_project_insurance
select spi.id, spi.project_id, sp.projectName as project_name, spi.dept_id, d.dept_name, spi.insurance_type, sdd.dict_label as insurance_type_name, spi.insurance_number, spi.insurance_file, spi.insurance_state, spi.begin_date, spi.end_date, spi.company_name, spi.is_del, spi.create_by, spi.create_time, spi.update_by, spi.update_time, spi.remark from sur_project_insurance spi
left join sur_project sp on sp.id=spi.project_id
left JOIN sys_dict_data sdd ON sdd.dict_type = 'sur_project_insurance_type' AND spi.insurance_type = sdd.dict_value
left join sys_dept d on d.dept_id = spi.dept_id
</sql>
<select id="selectProjectInsuranceListByProjectId" parameterType="Long" resultMap="SurProjectInsuranceResult">
@ -79,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and spui.del_flag=0
and d.del_flag=0
and sdd.dict_type = 'sur_project_insurance_type'
<if test="projectId != null "> and sp.id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
<if test="insuranceNumber != null and insuranceNumber != ''"> and spi.insurance_number like concat('%', #{insuranceNumber}, '%')</if>
@ -135,6 +139,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sdd.dict_sort
</select>
<select id="findGroupCountByProjectId" parameterType="Long" resultType="map">
SELECT
spi.insurance_type as insuranceType,
sdd.dict_label as insuranceTypeName,
count(1) AS total
FROM
sur_project_insurance spi
LEFT JOIN sys_dict_data sdd ON sdd.dict_type = 'sur_project_insurance_type' and spi.insurance_type = sdd.dict_value
WHERE
spi.is_del = 0
AND spi.project_id = #{projectId}
GROUP BY
spi.insurance_type
order by sdd.dict_sort
</select>
<!--查询项目保险统计列表-->
<select id="selectBgscreenInsuranceList" parameterType="SurProjectInsurance" resultType="map">
SELECT
@ -166,7 +186,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSurProjectInsuranceById" parameterType="Long" resultMap="SurProjectInsuranceResult">
<include refid="selectSurProjectInsuranceVo"/>
where id = #{id}
where spi.id = #{id}
</select>
<insert id="insertSurProjectInsurance" parameterType="SurProjectInsurance" useGeneratedKeys="true" keyProperty="id">

View File

@ -60,6 +60,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
</where>
</select>
<select id="findGroupCountByProjectId" parameterType="Long" resultType="map">
SELECT
use_position AS type,
count(1) total
FROM
sur_project_material_seal
where is_del=0
and project_id=1
GROUP BY
use_position
</select>
<select id="selectSurProjectMaterialSealById" parameterType="Long" resultMap="SurProjectMaterialSealResult">
<include refid="selectSurProjectMaterialSealVo"/>

View File

@ -73,6 +73,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
</where>
</select>
<select id="findGroupCountByProjectId" parameterType="Long" resultType="map">
select spm.measure_type as measureType, sdd.dict_label as measureTypeName,count(1) as total from sur_project_measure spm
left join sys_dict_data sdd on sdd.dict_type = 'project_measure_type' and sdd.dict_value=spm.measure_type
where spm.project_id=#{projectId}
GROUP BY spm.measure_type
ORDER BY sdd.dict_sort
</select>
<select id="selectSurProjectMeasureById" parameterType="Long" resultMap="SurProjectMeasureResult">
<include refid="selectSurProjectMeasureVo"/>

View File

@ -121,6 +121,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="findGroupCountByProjectId" parameterType="Long" resultType="map">
SELECT
spp.special_type AS type,
sdd.remark AS typeName,
count(1) AS total
FROM
sur_project_work_special spp
LEFT JOIN sys_dict_data sdd ON sdd.dict_type = 'project_special_type'
AND sdd.dict_value = spp.special_type
WHERE
spp.is_del = 0
AND spp.project_id = #{projectId}
GROUP BY
spp.special_type
ORDER By
sdd.dict_sort
</select>
<!--查询项目特种人员统计列表-->
<select id="selectBgscreenWorkSpecialList" parameterType="SurProjectWorkSpecial" resultType="map">
SELECT

View File

@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="recheckSend" column="recheckSend" />
<result property="recheckSendUser" column="recheckSendUser" />
<result property="roleType" column="roleType" />
<result property="problemType" column="problemType" />
<result property="vDel" column="v_del" />
<result property="createBy" column="createBy"/>
<result property="deptName" column="deptName"/>
@ -45,15 +46,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSmzSspProblemmodifyVo">
select id, projectId, infoType, problemArea, workParts, changeInfo, lordSent, lordSentUser, copySend, copySendUser, checkState, nickedArea, nickedTime, projectType, processName, projectName, nickedInfo, checkUser, checkUserPhone, isDel, createUser, createTime, updateUser, updateTime, marks_picture, marks_video, smark_url, danger_type, recheckSend, recheckSendUser, roleType from smz_ssp_problemmodify
select id, projectId, infoType, problemArea, workParts, changeInfo, lordSent, lordSentUser, copySend, copySendUser, checkState, nickedArea, nickedTime, projectType, processName, projectName, nickedInfo, checkUser, checkUserPhone, isDel, createUser, createTime, updateUser, updateTime, marks_picture, marks_video, smark_url, danger_type,problemType, recheckSend, recheckSendUser, roleType, problemType from smz_ssp_problemmodify
</sql>
<select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType,ssp.createBy,
CASE WHEN(ssp.createUser = #{nowUser}
or #{nowRole} in ('1','2','3','4') ) and ssp.checkState &lt; 4
THEN 0 ELSE 1
END AS v_del
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy
from vw_smz_ssp_problemmodify_audit ssp
left join sur_project sp on ssp.projectId = sp.id
<!--监理单位/总包公司/分包单位-->
@ -73,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkState != null "> and ssp.checkState = #{checkState}</if>
<if test="nickedArea != null and nickedArea != ''"> and nickedArea = #{nickedArea}</if>
<if test="nickedTime != null "> and ssp.nickedTime = #{nickedTime}</if>
<if test="problemType != null "> and ssp.problemType = #{problemType}</if>
<if test="projectType != null and projectType != ''"> and ssp.projectType = #{projectType}</if>
<if test="processName != null and processName != ''"> and ssp.processName like concat('%', #{processName}, '%')</if>
<if test="projectName != null and projectName != ''"> and ssp.projectName like concat('%', #{projectName}, '%')</if>
@ -105,13 +103,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectWechatSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy,
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName,
sdd.dict_label as danger_type_name,
case when ssp.recheckSendUser = #{nowUser} and ssp.checkState=1 then 0
when ssp.lordSentUser = #{nowUser} then 1
else 2 end sort
from vw_smz_ssp_problemmodify_audit ssp
from smz_ssp_problemmodify ssp
left join sur_project sp on ssp.projectId = sp.id
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
left join sys_dept ud on ud.dept_id = su.dept_id
@ -124,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ssp.isDel=0
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
<if test="problemType != null "> and ssp.problemType = #{problemType}</if>
<if test="roleType != null and roleType >0 "> and ssp.roleType = #{roleType}</if>
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
@ -163,6 +162,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by sort,ssp.createTime desc
</select>
<select id="findGroupCountByProjectId" parameterType="SmzSspProblemmodify" resultType="map">
SELECT
ssp.problemType,
count(1) AS total,
com.total AS comTotal
FROM
smz_ssp_problemmodify ssp
LEFT JOIN (
SELECT
ssp2.problemType AS type,
count(1) AS total
FROM
smz_ssp_problemmodify ssp2
WHERE
ssp2.checkState = 4
And ssp2.isDel=0
AND ssp2.projectId = #{projectId}
AND ssp2.infoType = #{infoType}
GROUP BY
ssp2.problemType
) com ON com.type = ssp.problemType
WHERE ssp.isDel=0
AND ssp.projectId = #{projectId}
AND ssp.infoType = #{infoType}
GROUP BY
ssp.problemType
</select>
<!--根据状态分组查询-->
<select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map">
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
@ -219,11 +246,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectSmzSspProblemmodifyInfoById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy,
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
case when ud.type_flag in (1,11) then concat(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd3.dict_label ,']') end as deptName,
IFNULL(sdd1.dict_label,sdd2.dict_label) as danger_type_name,
su.nick_name as createUserName
from vw_smz_ssp_problemmodify_audit ssp
from smz_ssp_problemmodify ssp
left join sur_project sp on ssp.projectId = sp.id
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
left join sys_dept ud on ud.dept_id = su.dept_id
@ -268,6 +295,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="recheckSend != null">recheckSend,</if>
<if test="recheckSendUser != null">recheckSendUser,</if>
<if test="roleType != null">roleType,</if>
<if test="problemType != null">problemType,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectId != null">#{projectId},</if>
@ -300,6 +328,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="recheckSend != null">#{recheckSend},</if>
<if test="recheckSendUser != null">#{recheckSendUser},</if>
<if test="roleType != null">#{roleType},</if>
<if test="problemType != null">#{problemType},</if>
</trim>
</insert>
@ -336,6 +365,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="recheckSend != null">recheckSend = #{recheckSend},</if>
<if test="recheckSendUser != null">recheckSendUser = #{recheckSendUser},</if>
<if test="roleType != null">roleType = #{roleType},</if>
<if test="problemType != null">problemType = #{problemType},</if>
</trim>
where id = #{id}
</update>

View File

@ -43,17 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames,
CASE
WHEN (
wt.create_by = #{nowUserName}
OR #{nowRole} IN ('1', '2', '3', '4')
)
AND begin_date > NOW() THEN
0
ELSE
1
END v_del
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
from work_train wt
left join work_train_dept wtd on wtd.train_id = wt.id
left join sys_dept sd on sd.dept_id = wtd.dept_id
@ -141,6 +131,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept d on b.dept_id = d.dept_id
where a.id = #{id}
</select>
<select id="findGroupCountByProjectId" parameterType="Long" resultType="map">
SELECT
wt.train_type as type,
sdd.dict_label as typeName,
count(1) AS total
FROM
work_train wt
LEFT JOIN sys_dict_data sdd ON sdd.dict_type = 'project_train_type'
AND sdd.dict_value = wt.train_type
WHERE
wt.is_del=0
AND wt.project_id = #{peojectId}
GROUP BY
wt.train_type
</select>
<insert id="insertWorkTrain" parameterType="WorkTrain" useGeneratedKeys="true" keyProperty="id">
insert into work_train