mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 05:12:07 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
+2
-1
@@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@@ -34,7 +35,7 @@ public interface OrganApi {
|
||||
@Operation(summary = "组织总数查询")
|
||||
CommonResult<Map<String, Integer>> getOrgTotal();
|
||||
|
||||
@GetMapping(PREFIX + "/separate/org")
|
||||
@PostMapping(PREFIX + "/separate/org")
|
||||
@Operation(summary = "新增、注销组织数量统计")
|
||||
CommonResult<Map<String, Object>> getOrgSeparate(@Valid OrgStatisticsReqDTO reqVO);
|
||||
|
||||
|
||||
+8
@@ -32,4 +32,12 @@ public interface DictTypeConstants {
|
||||
String DOOR_OPENING_DIRECTIONS = "doorOpeningDirections";//开门方向
|
||||
String PRODUCT_TYPE = "productType";//产品类型
|
||||
String SYNTHESIS_TYPE = "synthesisType";//加工组类型
|
||||
String DOOR_OPEN_DIR = "doorOpeningDirections";// 开门方向
|
||||
|
||||
String HOLE_FACE = "hole_face";//孔加工面
|
||||
String HOLE_DIR = "hole_direction";// 孔方向
|
||||
String HOLE_TYPE = "hole_type";//孔类型
|
||||
String PLATE_TEXTURE_TYPE = "plateTextureType";//板件纹路类型
|
||||
String PLATE_TEXTURE_TYPE_STATUS = "plateTextureTypeStatus";//板件纹路状态
|
||||
String PLATE_TEXTURE_TYPE_STATUS_TYPE = "plateTextureTypeStatusType";//板件纹路状态类型
|
||||
}
|
||||
|
||||
+3
-3
@@ -53,13 +53,13 @@ public class OrganApiImpl implements OrganApi {
|
||||
List<String> dateList = getDateList(reqVO.getCreateTime(),reqVO.getUnit());
|
||||
|
||||
|
||||
// 生产单有效数量
|
||||
Map<String, List<OrgStatisticsIsLapseRespDTO>> orderLapseRespMap = organService.orgCountAddByOrderDateAdd(reqVO).stream()
|
||||
// 组织有效数量
|
||||
Map<String, List<OrgStatisticsIsLapseRespDTO>> orderNotLapseRespMap = organService.orgCountAddByOrderDateAdd(reqVO).stream()
|
||||
.sorted(Comparator.naturalOrder())
|
||||
.collect(Collectors.groupingBy(OrgStatisticsIsLapseRespDTO::getDate, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
// 组织无效数量
|
||||
Map<String, List<OrgStatisticsIsLapseRespDTO>> orderNotLapseRespMap = organService.orgCountLapseByOrderDate(reqVO).stream()
|
||||
Map<String, List<OrgStatisticsIsLapseRespDTO>> orderLapseRespMap = organService.orgCountLapseByOrderDate(reqVO).stream()
|
||||
.sorted(Comparator.naturalOrder())
|
||||
.collect(Collectors.groupingBy(OrgStatisticsIsLapseRespDTO::getDate, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
|
||||
+20
-5
@@ -30,16 +30,16 @@
|
||||
|
||||
<sql id="dateFormat">
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', QUARTER(o.order_date)) as date
|
||||
,CONCAT(YEAR(o.update_time), '-', QUARTER(o.update_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date)) as date
|
||||
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date), '-', FLOOR((DayOfMonth(o.order_date)-1)/7)+1) AS date
|
||||
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', FLOOR((DayOfMonth(o.update_time)-1)/7)+1) AS date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date), '-', DAY(o.order_date)) as date
|
||||
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', DAY(o.update_time)) as date
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
@@ -53,10 +53,25 @@
|
||||
group by date;
|
||||
</select>
|
||||
|
||||
<sql id="dateCreate">
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', QUARTER(o.create_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', FLOOR((DayOfMonth(o.create_time)-1)/7)+1) AS date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', DAY(o.create_time)) as date
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectOrgCountAddByOrderDate"
|
||||
resultType="com.cf.imes.module.system.api.organ.dto.OrgStatisticsIsLapseRespDTO">
|
||||
select count(o.id) as orgCount
|
||||
<include refid="dateFormat"/>
|
||||
<include refid="dateCreate"/>
|
||||
from system_organization o
|
||||
where o.create_time between #{req.createTime[0]} and #{req.createTime[1]}
|
||||
and o.deleted = 0
|
||||
|
||||
Reference in New Issue
Block a user