Forráskód Böngészése

优化 采购调拨功能

java110 4 éve%!(EXTRA string=óta)
szülő
commit
48880bfb06

+ 7 - 7
java110-db/src/main/resources/mapper/community/NoticeServiceDaoImplMapper.xml

@@ -30,10 +30,10 @@
             and t.context= #{context}
         </if>
         <if test="startTime !=null">
-            and t.start_time= #{startTime}
+            and t.start_time &lt;= #{startTime}
         </if>
         <if test="endTime !=null">
-            and t.end_time= #{endTime}
+            and t.end_time &gt;= #{endTime}
         </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
@@ -108,10 +108,10 @@
             and t.context= #{context}
         </if>
         <if test="startTime !=null">
-            and t.create_time &gt;= #{startTime}
+            and t.start_time &lt;= #{startTime}
         </if>
         <if test="endTime !=null">
-            and t.create_time &lt;= #{endTime}
+            and t.end_time &gt;= #{endTime}
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
@@ -185,10 +185,10 @@
             and t.context= #{context}
         </if>
         <if test="startTime !=null">
-            and t.create_time &gt;= #{startTime}
+            and t.start_time &lt;= #{startTime}
         </if>
         <if test="endTime !=null">
-            and t.create_time &lt;= #{endTime}
+            and t.end_time &gt;= #{endTime}
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
@@ -207,4 +207,4 @@
         </if>
     </select>
 
-</mapper>
+</mapper>

+ 15 - 0
service-store/src/main/java/com/java110/store/cmd/resourceStore/SaveAllocationStorehouseCmd.java

@@ -11,9 +11,11 @@ import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.dto.allocationStorehouse.AllocationStorehouseDto;
 import com.java110.dto.allocationStorehouseApply.AllocationStorehouseApplyDto;
 import com.java110.dto.resourceStore.ResourceStoreDto;
+import com.java110.dto.user.UserDto;
 import com.java110.dto.userStorehouse.UserStorehouseDto;
 import com.java110.intf.common.IAllocationStorehouseUserInnerServiceSMO;
 import com.java110.intf.store.*;
+import com.java110.intf.user.IUserV1InnerServiceSMO;
 import com.java110.po.allocationStorehouse.AllocationStorehousePo;
 import com.java110.po.allocationStorehouseApply.AllocationStorehouseApplyPo;
 import com.java110.po.purchase.ResourceStorePo;
@@ -59,6 +61,9 @@ public class SaveAllocationStorehouseCmd extends AbstractServiceCmdListener {
     @Autowired
     private IUserStorehouseV1InnerServiceSMO userStorehouseV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         Assert.hasKeyAndValue(reqJson, "remark", "请求报文中未包含申请信息");
@@ -135,6 +140,16 @@ public class SaveAllocationStorehouseCmd extends AbstractServiceCmdListener {
         int flag = 0;
         //获取调拨返还状态标识
         String applyType = reqJson.getString("apply_type");
+
+        // 查询用户名称
+        UserDto userDto = new UserDto();
+        userDto.setUserId(reqJson.getString("userId"));
+        List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto);
+
+        if (userDtos != null && userDtos.size() > 0) {
+            reqJson.put("userName", userDtos.get(0).getUserName());
+        }
+
         //封装调拨对象
         AllocationStorehouseApplyPo allocationStorehouseApplyPo = covertAllocationStorehouseApply(reqJson);
         JSONArray resourceStores = reqJson.getJSONArray("resourceStores");