ccj před 2 roky
rodič
revize
f74608f1da

+ 10 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java

@@ -387,6 +387,16 @@ public class CommonUserController {
     public Page<NoticeTaskInfo> findHisPageNoticeTasks(NoticeTaskInfo noticeTask) {
         return commonUserService.findHisPageNoticeTasks(noticeTask);
     }
+    /**
+     * 查询任务
+     *
+     * @param noticeTask 查询条件
+     * @return 返回分页查询结果
+     */
+    @GetMapping("/query/findHisPageNoticeTasksMy")
+    public Page<NoticeTaskInfo> findHisPageNoticeTasksMy(NoticeTaskInfo noticeTask) {
+        return commonUserService.findHisPageNoticeTasksMy(noticeTask);
+    }
 
     /**
      * 查验app 账号

+ 15 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonUserMapper.java

@@ -37,5 +37,20 @@ public interface CommonUserMapper extends BaseMapper<CommonUser> {
      * @return
      */
     List<NoticeTaskInfo> getListByCondition(Map<String, Object> pageView);
+    /**
+     * 根据条件查询总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCountByConditionMy(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询
+     *
+     * @param pageView
+     * @return
+     */
+    List<NoticeTaskInfo> getListByConditionMy(Map<String, Object> pageView);
 
 }

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java

@@ -87,6 +87,7 @@ public interface ICommonUserService extends IService<CommonUser> {
     Account login(Account user, String veriCode);
 
     Page<NoticeTaskInfo> findHisPageNoticeTasks(NoticeTaskInfo noticeTask);
+    Page<NoticeTaskInfo> findHisPageNoticeTasksMy(NoticeTaskInfo noticeTask);
 
 
     String checkApp(CommonUser commonUser) throws ServiceException;

+ 27 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -852,6 +852,33 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         return page;
     }
 
+    /**
+     * 查询已发起任务
+     *
+     * @param noticeTask
+     * @return
+     */
+    @Override
+    public Page<NoticeTaskInfo> findHisPageNoticeTasksMy(NoticeTaskInfo noticeTask) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("startRecord", (noticeTask.getCurrentPage() - 1)
+                * noticeTask.getPageSize());
+        //  公司ID
+        pageView.put("userId", AuthSecurityUtils.getCurrentUserId());
+        pageView.put("roleId", AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getMajorRoleId());
+        pageView.put("pageSize", noticeTask.getPageSize());
+        pageView.put("currentPage", noticeTask.getCurrentPage());
+
+        // 查询总数
+        Integer dataCount = baseMapper.getCountByConditionMy(pageView);
+        List<NoticeTaskInfo> dataList = baseMapper.getListByConditionMy(pageView);
+        Page<NoticeTaskInfo> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(noticeTask.getCurrentPage());
+        page.setSize(noticeTask.getPageSize());
+        return page;
+    }
 
     /**
      * 过滤没有这个权限的任务

+ 53 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/CommonUserMapper.xml

@@ -101,4 +101,57 @@
 			LIMIT ${startRecord}, ${pageSize}
 		</if>
 	</select>
+
+	<select id="getCountByConditionMy" parameterType="Map" resultType="java.lang.Integer">
+        	SELECT
+	          count(id)
+             FROM
+             	notice_task_info
+             WHERE
+             	1=1
+             AND create_user_id = #{userId}
+          </select>
+
+
+
+
+	<select id="getListByConditionMy" parameterType="Map"
+			resultType="com.winsea.svc.notice.entity.NoticeTaskInfo">
+		SELECT
+		a.id AS id,
+		a.notice_task_status AS noticeTaskStatus,
+		a.business_type AS businessType,
+		a.comp_id AS compId,
+		a.overdue_date AS overdueDate,
+		a.overdue_date_flag AS overdueDateFlag,
+		a.notice_task_push_status AS noticeTaskPushStatus,
+		a.business_id AS businessId,
+		a.business_code AS businessCode,
+		b.business_type_desc AS messageTitle,
+		a.message_content AS messageContent,
+		a.accept_id AS acceptId,
+		a.accept_type AS acceptType,
+		a.vessel_id AS vesselId,
+		a.create_date AS createDate,
+		a.create_user_id AS createUserId,
+		a.update_date AS updateDate,
+		a.update_user_id AS updateUserId,
+		a.update_flag AS updateFlag,
+		a.delete_flag AS deleteFlag
+		FROM
+		notice_task_info a
+		left join notice_business_constant_info b
+		on b.business_code = a.business_code
+		WHERE
+		1=1
+		AND a.create_user_id = #{userId}
+		GROUP BY
+		a.business_id,
+		a.business_code
+		ORDER BY
+		a.create_date DESC
+		<if test="currentPage != null and currentPage != ''">
+			LIMIT ${startRecord}, ${pageSize}
+		</if>
+	</select>
 </mapper>

+ 2 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/QualityInspectionManagementMapper.xml

@@ -93,7 +93,8 @@
         q.supplementary_recording as supplementaryRecording,
         q.update_date as updateDate,
         q.quality_date as qualityDate,
-        q.dry_grain_price as dryGrainPrice
+        q.dry_grain_price as dryGrainPrice,
+        q.re_memo as reMemo
         FROM quality_inspection_management q
         WHERE q.comp_id = #{compId}
         and q.delete_flag = '0'

+ 4 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehousingOrderMapper.xml

@@ -151,7 +151,7 @@
             pm.delete_flag = '0'
             and pm.status !='待结算'
 			and pm.settlement_date> #{beforeDay}
-        group BY pm.contract_no,pm.customer_name,pm.goods_name,DATE_FORMAT(pm.settlement_date,"%Y%m%d")
+        group BY pm.contract_no,pm.customer_name,pm.goods_name
     </select>
     <!-- 采购入库单查询 -->
     <select id="getPurchaseListByCondition" parameterType="Map"
@@ -174,7 +174,7 @@
             and wio.in_out_type ='采购入库'
             and wbi.warehouse_type='1'
             and wio.in_out_date> #{beforeDay}
-        group BY wio.warehouse_name,wio.contract_no,DATE_FORMAT(wio.in_out_date,"%Y%m%d")
+        group BY wio.warehouse_name,wio.contract_no
     </select>
     <!-- 根据条件查询货源总数 -->
     <select id="getGoodSourceCountByCondition" parameterType="Map" resultType="java.lang.Integer">
@@ -297,7 +297,7 @@
           and wio.in_out_type ='移库入库'
           and wbi.warehouse_type='1'
           and wio.in_out_date> #{beforeDay}
-        group BY wio.in_out_task_no,DATE_FORMAT(wio.in_out_date,"%Y%m%d")
+        group BY wio.in_out_task_no
     </select>
     <!-- 退库入库单查询 -->
     <select id="getReturnListByCondition" parameterType="Map"
@@ -322,6 +322,6 @@
           and wio.in_out_type ='退库'
           and wbi.warehouse_type='1'
           and wio.in_out_date> #{beforeDay}
-        group BY wio.in_out_task_no,DATE_FORMAT(wio.in_out_date,"%Y%m%d")
+        group BY wio.in_out_task_no
     </select>
 </mapper>