Kaynağa Gözat

山西新需求修改

lvzhikai 4 yıl önce
ebeveyn
işleme
409ce329d4

+ 19 - 0
src/main/java/com/chinaitop/depot/keeperAccount/controller/StorageAccountRecordController.java

@@ -98,4 +98,23 @@ public class StorageAccountRecordController {
98 98
 		}
99 99
 		return map;
100 100
 	}
101
+
102
+	/**
103
+	 * 查询保管总账数量合计
104
+	 * @param orgId 组织机构id
105
+	 * @param lspz 粮食品种
106
+	 * @param lsxz 粮食性质
107
+	 * @return
108
+	 */
109
+	@RequestMapping(value="/getCountSumAccountzl", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
110
+	@ApiOperation(value="保管总账数量合计", notes = "保管总账数量合计")
111
+	@ApiImplicitParams({
112
+			@ApiImplicitParam(name = "orgId", value = "组织机构id", paramType = "query"),
113
+			@ApiImplicitParam(name="lspz", value="粮食品种", paramType="query"),
114
+			@ApiImplicitParam(name="lsxz", value="粮食性质", paramType="query")
115
+	})
116
+	public Map<String, Object> getCountSumAccountzl(Integer orgId, Integer lspz, Integer lsxz) {
117
+		Map<String, Object> mapSumNumber = recordService.getCountSumAccountzl(orgId,lspz,lsxz);
118
+		return mapSumNumber;
119
+	}
101 120
 }

+ 2 - 0
src/main/java/com/chinaitop/depot/keeperAccount/mapper/StorageAccountRecordMapper.java

@@ -50,4 +50,6 @@ public interface StorageAccountRecordMapper {
50 50
      * @return
51 51
      */
52 52
     List<Map<String, Object>> selectKCSL(Map<String, Object> map);
53
+
54
+    Map<String, Object> getCountSumAccountzl(Map<String, Object> map);
53 55
 }

+ 16 - 0
src/main/java/com/chinaitop/depot/keeperAccount/mapper/StorageAccountRecordMapper.xml

@@ -561,4 +561,20 @@
561 561
 	</if>
562 562
 	ORDER BY rq DESC
563 563
   </select>
564
+
565
+  <select id="getCountSumAccountzl" parameterType="java.util.Map" resultType="java.util.Map">
566
+    SELECT sum(srsl),sum(zcsl) FROM storage_account_record
567
+    WHERE 1=1
568
+    AND account_type = 0
569
+    AND auditor_date IS NOT NULL
570
+    <if test="orgId != null">
571
+      AND org_id=#{orgId}
572
+    </if>
573
+    <if test="pz != null">
574
+      and lspz = #{pz}
575
+    </if>
576
+    <if test="hwxz != null">
577
+      and hwxz = #{hwxz}
578
+    </if>
579
+  </select>
564 580
 </mapper>

+ 2 - 0
src/main/java/com/chinaitop/depot/keeperAccount/service/StorageAccountRecordService.java

@@ -89,4 +89,6 @@ public interface StorageAccountRecordService {
89 89
 	 * @return
90 90
 	 */
91 91
 	PageInfo<Map<String, Object>> setListData(HttpServletRequest request, PageInfo<Map<String, Object>> pageInfo);
92
+
93
+	Map<String, Object> getCountSumAccountzl(Integer orgId, Integer lspz, Integer lsxz);
92 94
 }

+ 17 - 0
src/main/java/com/chinaitop/depot/keeperAccount/service/impl/StorageAccountRecordServiceImpl.java

@@ -7,6 +7,7 @@ import java.util.Map;
7 7
 import javax.annotation.Resource;
8 8
 import javax.servlet.http.HttpServletRequest;
9 9
 
10
+import com.chinaitop.depot.utils.ParameterUtil;
10 11
 import org.apache.commons.lang.ObjectUtils;
11 12
 import org.springframework.stereotype.Service;
12 13
 
@@ -125,4 +126,20 @@ public class StorageAccountRecordServiceImpl implements StorageAccountRecordServ
125 126
 		}
126 127
 		return pageInfo;
127 128
 	}
129
+
130
+	@Override
131
+	public Map<String, Object> getCountSumAccountzl(Integer orgId, Integer lspz, Integer lsxz) {
132
+		Map<String, Object> map = new HashMap<String, Object>();
133
+		if (lspz != null) {
134
+			map.put("pz", lspz+"");
135
+		}
136
+		if (lsxz != null) {
137
+			map.put("hwxz", lsxz+"");
138
+		}
139
+
140
+		if (null != orgId && !"".equals(orgId)) {
141
+			map.put("orgId", orgId);
142
+		}
143
+		return mapper.getCountSumAccountzl(map);
144
+	}
128 145
 }