安全承诺和责任状导出相关接口
parent
5b09631573
commit
c10d2740c5
|
@ -10,14 +10,13 @@ import com.zcloud.service.bus.CorpPromiseDetailsService;
|
|||
import com.zcloud.service.bus.CorpPromisePeopleService;
|
||||
import com.zcloud.service.bus.CorpPromiseService;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -494,4 +493,73 @@ public class CorpPromiseController extends BaseController {
|
|||
map.put("dockData", JSON.toJSONString(dockData));
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 过去隐患列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/goListAllSignatureStatus")
|
||||
@ResponseBody
|
||||
public Object goListAllSignatureStatus(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (pd.get("YEAR").equals("")){
|
||||
String year = DateUtil.getYear();
|
||||
pd.put("YEAR",year);
|
||||
}
|
||||
page.setPd(pd);
|
||||
List<PageData> dataList = corpPromiseService.listAllSignatureStatus(page);
|
||||
map.put("YEAR",pd.getString("YEAR"));
|
||||
map.put("varList", dataList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**导出某一个选中项到excel
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excelSign")
|
||||
@ResponseBody
|
||||
public ModelAndView excelSign() throws Exception{
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (pd.get("YEAR").equals("")){
|
||||
String year = DateUtil.getYear();
|
||||
pd.put("YEAR",year);
|
||||
}
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("序号"); //1
|
||||
titles.add("部门名称"); //2
|
||||
titles.add("人员名称"); //3
|
||||
titles.add("应签承诺书数量"); //4
|
||||
titles.add("已签承诺书数量"); //5
|
||||
titles.add("待签承诺书数量"); //6
|
||||
dataMap.put("titles", titles);
|
||||
List<PageData> varOList = corpPromiseService.listAllSignatureStatus(pd);
|
||||
ArrayList<PageData> varList = new ArrayList<>();
|
||||
for(int i=0;i<varOList.size();i++){
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", i+1); //1
|
||||
vpd.put("var2", varOList.get(i).getString("DEPTNAME")); //2
|
||||
vpd.put("var3", varOList.get(i).getString("NAME")); //3
|
||||
vpd.put("var4", varOList.get(i).getString("ALL_SIGN_COUNT")); //4
|
||||
vpd.put("var5", varOList.get(i).getString("SIGNED_COUNT")); //5
|
||||
vpd.put("var6", varOList.get(i).getString("NEED_SINGED")); //6
|
||||
varList.add(vpd);
|
||||
}
|
||||
dataMap.put("varList", varList);
|
||||
dataMap.put("filename",pd.getString("YEAR") + "安全承诺签字情况");
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,14 +6,12 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.*;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -505,4 +503,73 @@ public class CorpResponsibilityController extends BaseController {
|
|||
map.put("dockData", JSON.toJSONString(dockData));
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 过去隐患列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/goListAllSignatureStatus")
|
||||
@ResponseBody
|
||||
public Object goListAllSignatureStatus(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (pd.get("YEAR").equals("")){
|
||||
String year = DateUtil.getYear();
|
||||
pd.put("YEAR",year);
|
||||
}
|
||||
page.setPd(pd);
|
||||
List<PageData> dataList = corpResponsibilityService.listAllSignatureStatus(page);
|
||||
map.put("YEAR",pd.getString("YEAR"));
|
||||
map.put("varList", dataList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**导出某一个选中项到excel
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excelSign")
|
||||
@ResponseBody
|
||||
public ModelAndView excelSign() throws Exception{
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (pd.get("YEAR").equals("")){
|
||||
String year = DateUtil.getYear();
|
||||
pd.put("YEAR",year);
|
||||
}
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("序号"); //1
|
||||
titles.add("部门名称"); //2
|
||||
titles.add("人员名称"); //3
|
||||
titles.add("应签责任状数量"); //4
|
||||
titles.add("已签责任状数量"); //5
|
||||
titles.add("待签责任状数量"); //6
|
||||
dataMap.put("titles", titles);
|
||||
List<PageData> varOList = corpResponsibilityService.listAllSignatureStatus(pd);
|
||||
ArrayList<PageData> varList = new ArrayList<>();
|
||||
for(int i=0;i<varOList.size();i++){
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", i+1); //1
|
||||
vpd.put("var2", varOList.get(i).getString("DEPTNAME")); //2
|
||||
vpd.put("var3", varOList.get(i).getString("NAME")); //3
|
||||
vpd.put("var4", varOList.get(i).getString("ALL_SIGN_COUNT")); //4
|
||||
vpd.put("var5", varOList.get(i).getString("SIGNED_COUNT")); //5
|
||||
vpd.put("var6", varOList.get(i).getString("NEED_SINGED")); //6
|
||||
varList.add(vpd);
|
||||
}
|
||||
dataMap.put("varList", varList);
|
||||
dataMap.put("filename",pd.getString("YEAR") + "安全生产责任状签字情况");
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.apache.logging.log4j.util.Strings;
|
|||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -107,6 +108,8 @@ public class HiddenController extends BaseController {
|
|||
private TemplateAnnounService templateAnnounService;
|
||||
@Resource
|
||||
private ApplicationContext applicationContext;
|
||||
@Value("${http.file.url}")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
@ -3728,7 +3731,7 @@ public class HiddenController extends BaseController {
|
|||
for (int i = 0; i < imgTypeMaxCount3; i++) {
|
||||
if (null != yhImg) {
|
||||
if (i < yhImg.size()) {
|
||||
vpd.put("img" + (count + i), yhImg.get(i));
|
||||
vpd.put("img" + (count + i), fileUrl + yhImg.get(i));
|
||||
} else {
|
||||
vpd.put("img" + (count + i), "");
|
||||
}
|
||||
|
@ -3746,7 +3749,7 @@ public class HiddenController extends BaseController {
|
|||
for (int i = 0; i < imgTypeMaxCount4; i++) {
|
||||
if (null != zgImg) {
|
||||
if (i < zgImg.size()) {
|
||||
vpd.put("img" + (count + i), zgImg.get(i));
|
||||
vpd.put("img" + (count + i), fileUrl + zgImg.get(i));
|
||||
} else {
|
||||
vpd.put("img" + (count + i), "");
|
||||
}
|
||||
|
@ -3765,7 +3768,7 @@ public class HiddenController extends BaseController {
|
|||
for (int i = 0; i < imgTypeMaxCount5; i++) {
|
||||
if (null != ysImg) {
|
||||
if (i < ysImg.size()) {
|
||||
vpd.put("img" + (count + i), ysImg.get(i));
|
||||
vpd.put("img" + (count + i), fileUrl + ysImg.get(i));
|
||||
} else {
|
||||
vpd.put("img" + (count + i), "");
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.apache.shiro.SecurityUtils;
|
|||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -63,6 +64,9 @@ public class HiddenExcelController extends BaseController {
|
|||
@Autowired
|
||||
private DepartmentService departmentService; // 部门信息
|
||||
|
||||
@Value("${http.file.url}")
|
||||
private String fileUrl;
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportExcelToSession")
|
||||
// // @RequiresPermissions("toExcel")
|
||||
|
@ -204,7 +208,7 @@ public class HiddenExcelController extends BaseController {
|
|||
List<PageData> hiddenimg = imgMap.get(hidden.getString("HIDDEN_ID") + "--" + "3");
|
||||
for (int himg = 0; himg < 4; himg++) {
|
||||
if (himg < hiddenimg.size()) {
|
||||
vpd.put("img" + (15 + himg), hiddenimg.get(himg).getString("FILEPATH"));
|
||||
vpd.put("img" + (15 + himg), fileUrl + hiddenimg.get(himg).getString("FILEPATH"));
|
||||
imgCountToSession++;
|
||||
} else {
|
||||
vpd.put("var" + (15 + himg), "");
|
||||
|
@ -225,7 +229,7 @@ public class HiddenExcelController extends BaseController {
|
|||
List<PageData> hiddenimg = imgMap.get(hidden.getString("HIDDEN_ID") + "--" + "4");
|
||||
for (int himg = 0; himg < 4; himg++) {
|
||||
if (himg < hiddenimg.size()) {
|
||||
vpd.put("img" + (24 + himg), hiddenimg.get(himg).getString("FILEPATH"));
|
||||
vpd.put("img" + (24 + himg), fileUrl + hiddenimg.get(himg).getString("FILEPATH"));
|
||||
imgCountToSession++;
|
||||
} else {
|
||||
vpd.put("var" + (24 + himg), "");
|
||||
|
@ -253,7 +257,7 @@ public class HiddenExcelController extends BaseController {
|
|||
List<PageData> hiddenimg = imgMap.get(acc.getString("HIDDENCHECK_ID") + "--" + "5");
|
||||
for (int himg = 0; himg < 4; himg++) {
|
||||
if (himg < hiddenimg.size()) {
|
||||
vpd.put("img" + (34 + himg), hiddenimg.get(himg).getString("FILEPATH"));
|
||||
vpd.put("img" + (34 + himg), fileUrl + hiddenimg.get(himg).getString("FILEPATH"));
|
||||
imgCountToSession++;
|
||||
} else {
|
||||
vpd.put("var" + (34 + himg), "");
|
||||
|
|
|
@ -33,6 +33,10 @@ public interface CorpPromiseMapper {
|
|||
|
||||
List<PageData> dataAlllistPage(Page page);
|
||||
|
||||
List<PageData> getAllSignatureStatuslistPage(Page page);
|
||||
|
||||
List<PageData> getAllSignatureStatus(PageData pd);
|
||||
|
||||
List<PageData> collateralall(PageData pd);
|
||||
|
||||
void editpeople(PageData pd);
|
||||
|
|
|
@ -42,5 +42,8 @@ public interface CorpResponsibilityMapper {
|
|||
|
||||
void decPeoplenumInvolved(PageData pd);
|
||||
|
||||
List<PageData> getAllSignatureStatuslistPage(Page page);
|
||||
|
||||
List<PageData> getAllSignatureStatus(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,10 @@ public interface CorpPromiseService {
|
|||
|
||||
List<PageData> listAll(Page page)throws Exception;
|
||||
|
||||
List<PageData> listAllSignatureStatus(Page page)throws Exception;
|
||||
|
||||
List<PageData> listAllSignatureStatus(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> collateralall(PageData pd)throws Exception;
|
||||
|
||||
void editpeople(PageData pd)throws Exception;
|
||||
|
|
|
@ -56,4 +56,8 @@ public interface CorpResponsibilityService {
|
|||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> listAllSignatureStatus(Page page)throws Exception;
|
||||
|
||||
List<PageData> listAllSignatureStatus(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,16 @@ public class CorpPromiseServiceImpl implements CorpPromiseService {
|
|||
return corpPromiseMapper.dataAlllistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllSignatureStatus(Page page) throws Exception {
|
||||
return corpPromiseMapper.getAllSignatureStatuslistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllSignatureStatus(PageData pd) throws Exception {
|
||||
return corpPromiseMapper.getAllSignatureStatus(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> collateralall(PageData pd) throws Exception {
|
||||
return corpPromiseMapper.collateralall(pd);
|
||||
|
|
|
@ -71,4 +71,16 @@ public class CorpResponsibilityServiceImpl implements CorpResponsibilityService
|
|||
public void delete(PageData pd) throws Exception {
|
||||
corpPromiseMapper.delete(pd);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllSignatureStatus(Page page) throws Exception {
|
||||
return corpPromiseMapper.getAllSignatureStatuslistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllSignatureStatus(PageData pd) throws Exception {
|
||||
return corpPromiseMapper.getAllSignatureStatus(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class HiddenExcelImgToSessionView extends AbstractXlsView{
|
|||
continue;
|
||||
}
|
||||
try {
|
||||
URL url = new URL(beji + varstr);
|
||||
URL url = new URL(varstr);
|
||||
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setConnectTimeout(5 * 1000);
|
||||
|
|
|
@ -109,7 +109,7 @@ public class HiddenExcelImgView extends AbstractXlsView{
|
|||
continue;
|
||||
}
|
||||
try {
|
||||
URL url = new URL(beji + varstr);
|
||||
URL url = new URL(varstr);
|
||||
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setConnectTimeout(5 * 1000);
|
||||
|
|
|
@ -197,6 +197,69 @@
|
|||
order by CREATTIME desc
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="getAllSignatureStatuslistPage" parameterType="page" resultType="pd">
|
||||
SELECT
|
||||
f.NAME,
|
||||
v.`NAME` DEPTNAME,
|
||||
count( DISTINCT b.PROMISEPEOPLE_ID ) ALL_SIGN_COUNT,
|
||||
count( DISTINCT c.PROMISEPEOPLE_ID ) SIGNED_COUNT,
|
||||
count( DISTINCT b.PROMISEPEOPLE_ID ) - count( DISTINCT c.PROMISEPEOPLE_ID ) NEED_SINGED
|
||||
FROM
|
||||
sys_user f
|
||||
LEFT JOIN bus_corppromise_people b ON b.USER_ID = f.USER_ID AND b.ISPROMISE_PEOPLE = '0' AND b.ISDELETE = '0'
|
||||
LEFT JOIN bus_corppromise_people c ON c.USER_ID = f.USER_ID
|
||||
AND c.ISSIGN = 1 AND c.ISPROMISE_PEOPLE = '0' AND c.ISDELETE = '0'
|
||||
LEFT JOIN vi_department_all v ON v.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN bus_corppromise d ON d.PROMISE_ID = b.PROMISE_ID
|
||||
LEFT JOIN bus_corppromise e ON e.PROMISE_ID = c.PROMISE_ID
|
||||
WHERE
|
||||
f.CORPINFO_ID = '6aa255d41602497fa0f934a822820df4'
|
||||
AND
|
||||
d.STATE = '0'
|
||||
AND
|
||||
( e.PROMISE_ID is null OR e.STATE != '1')
|
||||
<if test="pd.YEAR != null and pd.YEAR != ''">
|
||||
AND (date_format( `d`.`CREATTIME`, '%Y' ) = #{pd.YEAR} OR date_format( `e`.`CREATTIME`, '%Y' ) = #{pd.YEAR})
|
||||
</if>
|
||||
GROUP BY
|
||||
f.USER_ID
|
||||
ORDER BY
|
||||
NEED_SINGED DESC,SIGNED_COUNT DESC, ALL_SIGN_COUNT DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="getAllSignatureStatus" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.NAME,
|
||||
v.`NAME` DEPTNAME,
|
||||
count( DISTINCT b.PROMISEPEOPLE_ID ) ALL_SIGN_COUNT,
|
||||
count( DISTINCT c.PROMISEPEOPLE_ID ) SIGNED_COUNT,
|
||||
count( DISTINCT b.PROMISEPEOPLE_ID ) - count( DISTINCT c.PROMISEPEOPLE_ID ) NEED_SINGED
|
||||
FROM
|
||||
sys_user f
|
||||
LEFT JOIN bus_corppromise_people b ON b.USER_ID = f.USER_ID AND b.ISPROMISE_PEOPLE = '0' AND b.ISDELETE = '0'
|
||||
LEFT JOIN bus_corppromise_people c ON c.USER_ID = f.USER_ID
|
||||
AND c.ISSIGN = 1 AND c.ISPROMISE_PEOPLE = '0' AND c.ISDELETE = '0'
|
||||
LEFT JOIN vi_department_all v ON v.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN bus_corppromise d ON d.PROMISE_ID = b.PROMISE_ID
|
||||
LEFT JOIN bus_corppromise e ON e.PROMISE_ID = c.PROMISE_ID
|
||||
WHERE
|
||||
f.CORPINFO_ID = '6aa255d41602497fa0f934a822820df4'
|
||||
AND
|
||||
d.STATE = '0'
|
||||
AND
|
||||
( e.PROMISE_ID is null OR e.STATE != '1')
|
||||
<if test="YEAR != null and YEAR != ''">
|
||||
AND (date_format( `d`.`CREATTIME`, '%Y' ) = #{YEAR} OR date_format( `e`.`CREATTIME`, '%Y' ) = #{YEAR})
|
||||
</if>
|
||||
GROUP BY
|
||||
f.USER_ID
|
||||
ORDER BY
|
||||
NEED_SINGED DESC,SIGNED_COUNT DESC, ALL_SIGN_COUNT DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 副文列表 -->
|
||||
<select id="collateralall" parameterType="page" resultType="pd">
|
||||
select
|
||||
|
|
|
@ -245,4 +245,66 @@
|
|||
where
|
||||
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="getAllSignatureStatuslistPage" parameterType="page" resultType="pd">
|
||||
SELECT
|
||||
f.NAME,
|
||||
v.`NAME` DEPTNAME,
|
||||
count( DISTINCT b.RESPONSIBILITYPEOPLE_ID ) ALL_SIGN_COUNT,
|
||||
count( DISTINCT c.RESPONSIBILITYPEOPLE_ID ) SIGNED_COUNT,
|
||||
count( DISTINCT b.RESPONSIBILITYPEOPLE_ID ) - count( DISTINCT c.RESPONSIBILITYPEOPLE_ID ) NEED_SINGED
|
||||
FROM
|
||||
sys_user f
|
||||
LEFT JOIN bus_corpresponsibility_people b ON b.USER_ID = f.USER_ID AND b.ISRESPONSIBILITY_PEOPLE = '0' AND b.ISDELETE = '0'
|
||||
LEFT JOIN bus_corpresponsibility_people c ON c.USER_ID = f.USER_ID
|
||||
AND c.ISSIGN = 1 AND c.ISRESPONSIBILITY_PEOPLE = '0' AND c.ISDELETE = '0'
|
||||
LEFT JOIN vi_department_all v ON v.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN bus_corpresponsibility d ON d.RESPONSIBILITY_ID = b.RESPONSIBILITY_ID
|
||||
LEFT JOIN bus_corpresponsibility e ON e.RESPONSIBILITY_ID = c.RESPONSIBILITY_ID
|
||||
WHERE
|
||||
f.CORPINFO_ID = '6aa255d41602497fa0f934a822820df4'
|
||||
AND
|
||||
d.STATE = '0'
|
||||
AND
|
||||
( e.RESPONSIBILITY_ID is null OR e.STATE != '1')
|
||||
<if test="pd.YEAR != null and pd.YEAR != ''">
|
||||
AND ( date_format( `d`.`CREATTIME`, '%Y' ) = #{pd.YEAR} OR date_format( `e`.`CREATTIME`, '%Y' ) = #{pd.YEAR} )
|
||||
</if>
|
||||
GROUP BY
|
||||
f.USER_ID
|
||||
ORDER BY
|
||||
NEED_SINGED DESC,SIGNED_COUNT DESC, ALL_SIGN_COUNT DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="getAllSignatureStatus" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.NAME,
|
||||
v.`NAME` DEPTNAME,
|
||||
count( DISTINCT b.RESPONSIBILITYPEOPLE_ID ) ALL_SIGN_COUNT,
|
||||
count( DISTINCT c.RESPONSIBILITYPEOPLE_ID ) SIGNED_COUNT,
|
||||
count( DISTINCT b.RESPONSIBILITYPEOPLE_ID ) - count( DISTINCT c.RESPONSIBILITYPEOPLE_ID ) NEED_SINGED
|
||||
FROM
|
||||
sys_user f
|
||||
LEFT JOIN bus_corpresponsibility_people b ON b.USER_ID = f.USER_ID AND b.ISRESPONSIBILITY_PEOPLE = '0' AND b.ISDELETE = '0'
|
||||
LEFT JOIN bus_corpresponsibility_people c ON c.USER_ID = f.USER_ID
|
||||
AND c.ISSIGN = 1 AND c.ISRESPONSIBILITY_PEOPLE = '0' AND c.ISDELETE = '0'
|
||||
LEFT JOIN vi_department_all v ON v.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN bus_corpresponsibility d ON d.RESPONSIBILITY_ID = b.RESPONSIBILITY_ID
|
||||
LEFT JOIN bus_corpresponsibility e ON e.RESPONSIBILITY_ID = c.RESPONSIBILITY_ID
|
||||
WHERE
|
||||
f.CORPINFO_ID = '6aa255d41602497fa0f934a822820df4'
|
||||
AND
|
||||
d.STATE = '0'
|
||||
AND
|
||||
( e.RESPONSIBILITY_ID is null OR e.STATE != '1')
|
||||
<if test="YEAR != null and YEAR != ''">
|
||||
AND ( date_format( `d`.`CREATTIME`, '%Y' ) = #{YEAR} OR date_format( `e`.`CREATTIME`, '%Y' ) = #{YEAR} )
|
||||
</if>
|
||||
GROUP BY
|
||||
f.USER_ID
|
||||
ORDER BY
|
||||
NEED_SINGED DESC,SIGNED_COUNT DESC, ALL_SIGN_COUNT DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue