Commit 58cb0f50 authored by “yiyousong”'s avatar “yiyousong”
parents 763e9316 6416a161
...@@ -60,6 +60,21 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -60,6 +60,21 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
return super.viewAfter(id, model, entity, context); return super.viewAfter(id, model, entity, context);
} }
/**
* @param id
* @param model
* @param entity
* @param context
* @return
* @throws AppException
*/
@Override
protected int infoAfter(Long id, Map<String, Object> model, MatterDatumEntity entity, Context context) throws AppException {
List<MatterDatumFileEntity> matterDatumFileEntities = matterDatumFileService.find(new MatterDatumFileQuery().datumId(entity.getId()));
entity.setDatumFileList(matterDatumFileEntities);
return super.infoAfter(id, model, entity, context);
}
/** /**
* @param query * @param query
* @param model * @param model
......
...@@ -57,6 +57,42 @@ ...@@ -57,6 +57,42 @@
</if>--> </if>-->
</trim> </trim>
</trim> </trim>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
CASE
WHEN fieldType = 'date' THEN STR_TO_DATE(fieldValue, '%Y-%m-%d')
ELSE NULL
END
<trim prefix="," suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('appId')">
a.appId
<if test='orderCol.appId != null and "DESC".equalsIgnoreCase(orderCol.appId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</select> </select>
<!-- 条件映射 --> <!-- 条件映射 -->
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<result property="datumId" column="datumId" /> <result property="datumId" column="datumId" />
<result property="fileName" column="fileName" /> <result property="fileName" column="fileName" />
<result property="fileUrl" column="fileUrl" /> <result property="fileUrl" column="fileUrl" />
<result property="localFileUrl" column="localFileUrl" />
<result property="filetype" column="filetype" /> <result property="filetype" column="filetype" />
<result property="source" column="source" /> <result property="source" column="source" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
...@@ -133,7 +134,7 @@ ...@@ -133,7 +134,7 @@
<!-- 子表所有列 --> <!-- 子表所有列 -->
<sql id="_columns_sub"> <sql id="_columns_sub">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
b.id,b.datumId,b.fileName,b.fileUrl,b.filetype,b.source,b.createTime,b.createUserId,b.updateTime,b.materialName, b.id,b.datumId,b.fileName,b.fileUrl,b.localFileUrl,b.filetype,b.source,b.createTime,b.createUserId,b.updateTime,b.materialName,
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
......
...@@ -20,13 +20,6 @@ Content-Type: application/json ...@@ -20,13 +20,6 @@ Content-Type: application/json
{ {
"siteId": 1, "siteId": 1,
"appId": 79, "appId": 79,
"orConditionList": [ {
"fieldCode":"year",
"fieldValue":"2022"
},{
"fieldCode":"yOrm",
"fieldValue":"0"
}],
"page": 1, "page": 1,
"size": 10 "size": 10
} }
......
...@@ -124,7 +124,7 @@ client.global.set("Matter_id", JSON.parse(response.body).data.id); ...@@ -124,7 +124,7 @@ client.global.set("Matter_id", JSON.parse(response.body).data.id);
%} %}
###基础事项查看 ###基础事项查看
GET {{baseUrl}}/matter/info?id=39654 GET {{baseUrl}}/matter/info?id=34081
Accept: application/json Accept: application/json
###基础事项编辑 ###基础事项编辑
......
...@@ -4,9 +4,6 @@ POST {{baseUrl}}/matter/datum/list ...@@ -4,9 +4,6 @@ POST {{baseUrl}}/matter/datum/list
Content-Type: application/json Content-Type: application/json
{ {
"matterId":3227 ,
"matterName":"r4s0v4" ,
"materialName":"b2fx5n" ,
"page":1, "page":1,
"size":10 "size":10
} }
...@@ -60,7 +57,7 @@ client.global.set("MatterDatum_id", JSON.parse(response.body).data.id); ...@@ -60,7 +57,7 @@ client.global.set("MatterDatum_id", JSON.parse(response.body).data.id);
%} %}
###事项申请材料查看 ###事项申请材料查看
GET {{baseUrl}}/matter/datum/info?id={{MatterDatum_id}} GET {{baseUrl}}/matter/datum/info?id=53092
Accept: application/json Accept: application/json
###事项申请材料编辑 ###事项申请材料编辑
......
package com.mortals.xhx.module.area.model; package com.mortals.xhx.module.area.model;
import cn.hutool.core.date.DateUtil;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -70,4 +73,30 @@ public class AreaTreeSelect implements Serializable { ...@@ -70,4 +73,30 @@ public class AreaTreeSelect implements Serializable {
} }
public static void main(String[] args) {
int year = 2023; // 目标年份
int week = 42; // 目标周数
int dayOfWeek = 2; // 目标星期几 (1 表示星期日,2 表示星期一,以此类推)
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.WEEK_OF_YEAR, week);
calendar.set(Calendar.DAY_OF_WEEK, dayOfWeek);
int targetYear = calendar.get(Calendar.YEAR);
int targetMonth = calendar.get(Calendar.MONTH) + 1; // 月份是从 0 开始计数的,所以需要 +1
int targetDay = calendar.get(Calendar.DAY_OF_MONTH);
System.out.println("目标日期:" + targetYear + "-" + targetMonth + "-" + targetDay);
String 年_月_日 = DateUtil.format(new Date(), "年 月 日");
System.out.println(年_月_日);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment