fangq 4 лет назад
Родитель
Сommit
d365ea1df3

+ 1 - 0
src/main/java/org/springblade/bank/checklist/mapper/ChecklistMapper.xml

@@ -24,6 +24,7 @@
         <result column="remark" property="remark"/>
         <result column="filling_date" property="fillingDate"/>
         <result column="cycle" property="cycle"/>
+        <result column="is_turn_in" property="isTurnIn"/>
     </resultMap>
 
     <select id="selectChecklistPage" resultMap="checklistResultMap">

+ 2 - 10
src/main/java/org/springblade/bank/postchange/controller/PostChangeController.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.bank.postchange.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -203,16 +204,7 @@ public class PostChangeController extends BladeController {
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "获取最新一条记录", notes = "")
 	public R getLastRecord() {
-		Query query = new Query();
-		query.setSize(1);
-		query.setCurrent(1);
-		IPage<PostChangeVO> pages = postChangeService.selectPostChangePage(Condition.getPage(query), new PostChangeVO());
-		List<PostChangeVO> records = pages.getRecords();
-		if (records.size() > 0){
-			return R.data(records.get(0));
-		}else{
-			return R.data(null);
-		}
+		return R.data( postChangeService.getLastRecord());
 	}
 
 

+ 4 - 0
src/main/java/org/springblade/bank/postchange/mapper/PostChangeMapper.xml

@@ -59,4 +59,8 @@
         order by create_time DESC
     </select>
 
+    <select id="selectList" resultMap="postChangeResultMap">
+        select * from zh_record_post_change where is_deleted = 0 and id != 1 order by create_time DESC
+    </select>
+
 </mapper>

+ 3 - 1
src/main/java/org/springblade/bank/sealhandover/controller/SealHandoverController.java

@@ -186,7 +186,9 @@ public class SealHandoverController extends BladeController {
 		User user = userService.getById(currentUser.getUserId());
 		Dept dept = deptService.getById(user.getDeptId());
 		UserLog userLog = new UserLog();
-		Assert.isTrue(!sealHandover.getReceiverNo().equals(user.getEhr()), "當前填報人不能作為接收人!請重新選擇!");
+		if (StringUtils.isNotBlank(sealHandover.getReceiverNo())){
+			Assert.isTrue(!sealHandover.getReceiverNo().equals(sealHandover.getHandoverPersonNo()), "交出人不可為接收人!請重新選擇!");
+		}
 
 		SealHandover old = null;
 		if (isAdd){

+ 5 - 1
src/main/java/org/springblade/bank/sealhandover/entity/SealHandover.java

@@ -114,6 +114,10 @@ public class SealHandover extends BaseEntity {
 	*/
 		@ApiModelProperty(value = "填報人")
 		private String fillingPerson;
-
+	/**
+	 * 是否上繳至上級單位
+	 */
+	@ApiModelProperty(value = "是否上繳至上級單位")
+	private Integer isTurnIn;
 
 }