Procházet zdrojové kódy

记账反记账修改

chenw před 7 roky
rodič
revize
b40c8bf4a0

+ 2 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EndProductMapper.java

@@ -12,6 +12,8 @@ public interface EndProductMapper {
 
     String selectPeriod(@Param("companyId") Long companyId);
 
+    String selectUnPeriod(@Param("companyId") Long companyId);
+
     List<MessagelogDTO> getListData(@Param("condition") String condition, @Param("companyId") Long companyId);
 
     void updatePeriodStatus(@Param("status") Long status,@Param("period") String period, @Param("companyId") Long companyId);

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java

@@ -70,7 +70,7 @@ public class EndProductServiceImpl implements EndProductService {
 
     @Override
     public void unEndAccount() {
-        String period = endProductMapper.selectPeriod(BaseContextHolder.getCompanyId());
+        String period = endProductMapper.selectUnPeriod(BaseContextHolder.getCompanyId());
         if (StringUtils.isEmpty(period)){
             throw new BizException(79306,"系统还未结账,不能反结账");
         }else{

+ 3 - 0
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -10,6 +10,9 @@
     <select id="selectPeriod" resultType="string">
         select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=0 order by PD_DETNO LIMIT 1;
     </select>
+    <select id="selectUnPeriod" resultType="string">
+        select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=99 order by PD_DETNO desc LIMIT 1;
+    </select>
     <resultMap id="MsgResult" type="com.usoftchina.saas.commons.dto.MessagelogDTO">
         <result column="ml_content" property="ml_content" jdbcType="VARCHAR" />
         <result column="ml_result" property="ml_result" jdbcType="VARCHAR" />

+ 1 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -100,8 +100,7 @@ public class ProductController {
 
     @GetMapping("/ReserveCost")
     public Result getReserveCost(PageRequest page, ListReqDTO listReqDTO){
-        productService.getReserveCost(page, listReqDTO);
-        return Result.success();
+        return Result.success(productService.getReserveCost(page, listReqDTO));
     }
 
 }