代码优化
This commit is contained in:
@ -2,10 +2,7 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.controller;
|
|||||||
|
|
||||||
import com.chinaunicom.mall.ebtp.common.base.controller.BaseController;
|
import com.chinaunicom.mall.ebtp.common.base.controller.BaseController;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory;
|
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank;
|
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessCategoryService;
|
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessItemService;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessItemService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -23,14 +20,14 @@ import java.util.List;
|
|||||||
@RequestMapping("/coscoAccessItem")
|
@RequestMapping("/coscoAccessItem")
|
||||||
public class CoscoAccessItemController extends BaseController {
|
public class CoscoAccessItemController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICoscoAccessCategoryService coscoAccessCategoryService;
|
private ICoscoAccessItemService coscoAccessItemService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组查询工作任务下的评审项
|
* 分组查询工作任务下的评审项
|
||||||
*/
|
*/
|
||||||
@GetMapping("/groupByList")
|
@GetMapping("/groupByList")
|
||||||
public BaseResponse<List<CoscoAccessCategory>> groupByList(CoscoAccessCategory coscoAccessCategory) {
|
public BaseResponse<List<CoscoAccessItem>> groupByList(CoscoAccessItem coscoAccessItem) {
|
||||||
List<CoscoAccessCategory> list = coscoAccessCategoryService.selectCoscoAccessCategoryList(coscoAccessCategory);
|
List<CoscoAccessItem> list = coscoAccessItemService.selectGroupByItemList(coscoAccessItem);
|
||||||
return BaseResponse.success(list);
|
return BaseResponse.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,6 +286,7 @@ public class CoscoSupplierBaseController extends BaseController {
|
|||||||
@ApiOperation("查询数据")
|
@ApiOperation("查询数据")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public BaseResponse<CoscoSupplierVo> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
|
public BaseResponse<CoscoSupplierVo> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
|
||||||
|
id = "1944943451761344512";
|
||||||
return BaseResponse.success(coscoSupplierBaseService.selectCoscoSupplierBaseById(id));
|
return BaseResponse.success(coscoSupplierBaseService.selectCoscoSupplierBaseById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public int updateCoscoAccessWork(CoscoAccessUserItemVo vo) {
|
public int updateCoscoAccessWork(CoscoAccessUserItemVo vo) {
|
||||||
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
||||||
String userId = "USER002";
|
String userId = currentUser.getUserId();
|
||||||
Date date = CoscoDateUtils.getNowDate();
|
Date date = CoscoDateUtils.getNowDate();
|
||||||
|
|
||||||
//修改评审项关联评审人员表
|
//修改评审项关联评审人员表
|
||||||
|
@ -20,6 +20,8 @@ public class SupplierPageVo {
|
|||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
private String nameEn;
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
@ -83,6 +85,11 @@ public class SupplierPageVo {
|
|||||||
|
|
||||||
private String socialCreditCode;
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三合一统一信用代码
|
||||||
|
*/
|
||||||
|
private String unifiedCode;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分页对象信息")
|
@ApiModelProperty(value = "分页对象信息")
|
||||||
private BasePageRequest basePageRequest;
|
private BasePageRequest basePageRequest;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,9 @@
|
|||||||
|
|
||||||
<select id="selectExitCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
|
<select id="selectExitCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
|
||||||
SELECT
|
SELECT
|
||||||
s.`name` as supplierName,
|
CASE
|
||||||
|
WHEN s.supplier_type = 'ovs' THEN
|
||||||
|
name_en ELSE name END AS supplierName,
|
||||||
ca.category_name as categoryName,
|
ca.category_name as categoryName,
|
||||||
es.review_result as reviewResult,
|
es.review_result as reviewResult,
|
||||||
es.evaTime,
|
es.evaTime,
|
||||||
@ -143,6 +145,7 @@
|
|||||||
c.access_work_id,
|
c.access_work_id,
|
||||||
c.supplier_id,
|
c.supplier_id,
|
||||||
c.category_id,
|
c.category_id,
|
||||||
|
c.dept_id,
|
||||||
c.del_flag,
|
c.del_flag,
|
||||||
c.create_by,
|
c.create_by,
|
||||||
c.create_time,
|
c.create_time,
|
||||||
|
@ -34,7 +34,9 @@
|
|||||||
<sql id="selectCoscoAccessSupplierVo">
|
<sql id="selectCoscoAccessSupplierVo">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
s.`name` AS supplierName,
|
CASE
|
||||||
|
WHEN s.supplier_type = 'ovs' THEN name_en
|
||||||
|
ELSE name END AS supplierName,
|
||||||
a.access_work_id,
|
a.access_work_id,
|
||||||
a.supplier_id,
|
a.supplier_id,
|
||||||
a.dept_id
|
a.dept_id
|
||||||
|
@ -186,6 +186,7 @@
|
|||||||
<sql id="selecWzrListVo">
|
<sql id="selecWzrListVo">
|
||||||
SELECT
|
SELECT
|
||||||
csb.id,
|
csb.id,
|
||||||
|
csb.supplier_type,
|
||||||
CASE
|
CASE
|
||||||
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
|
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
|
||||||
WHEN csb.supplier_type = 'ovs' THEN vat
|
WHEN csb.supplier_type = 'ovs' THEN vat
|
||||||
@ -821,8 +822,14 @@
|
|||||||
select
|
select
|
||||||
csb.id,
|
csb.id,
|
||||||
csb.name,
|
csb.name,
|
||||||
|
csb.name_en as nameEn,
|
||||||
csb.supplier_type AS supplierType,
|
csb.supplier_type AS supplierType,
|
||||||
csb.social_credit_code AS socialCreditCode,
|
CASE
|
||||||
|
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
|
||||||
|
WHEN csb.supplier_type = 'ovs' THEN vat
|
||||||
|
WHEN csb.supplier_type = 'pe' THEN id_card
|
||||||
|
ELSE NULL
|
||||||
|
END AS unifiedCode,
|
||||||
GROUP_CONCAT(caw.dept_id) as dept_id,
|
GROUP_CONCAT(caw.dept_id) as dept_id,
|
||||||
max(caw.update_time) AS admissionTime,
|
max(caw.update_time) AS admissionTime,
|
||||||
max(ets.update_time) AS evaluationTime ,
|
max(ets.update_time) AS evaluationTime ,
|
||||||
@ -872,6 +879,9 @@
|
|||||||
<if test="vo.name!=null and vo.name!=''">
|
<if test="vo.name!=null and vo.name!=''">
|
||||||
and csb.name like concat('%',#{vo.name},'%')
|
and csb.name like concat('%',#{vo.name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="vo.supplierType!=null and vo.supplierType!=''">
|
||||||
|
and csb.supplier_type = #{vo.supplierType}
|
||||||
|
</if>
|
||||||
<if test="vo.deptId!=null and vo.deptId!=''">
|
<if test="vo.deptId!=null and vo.deptId!=''">
|
||||||
and cas.dept_id = #{vo.deptId}
|
and cas.dept_id = #{vo.deptId}
|
||||||
</if>
|
</if>
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
e.exit_theme,
|
e.exit_theme,
|
||||||
e.dept_id,
|
e.dept_id,
|
||||||
e.create_time,
|
e.create_time,
|
||||||
s.`name` as supplierName,
|
CASE
|
||||||
|
WHEN s.supplier_type = 'ovs' THEN
|
||||||
|
name_en ELSE name END AS supplierName,
|
||||||
ca.category_name as categoryName,
|
ca.category_name as categoryName,
|
||||||
sc.supplierexit_id,
|
sc.supplierexit_id,
|
||||||
sc.supplier_id,
|
sc.supplier_id,
|
||||||
|
Reference in New Issue
Block a user