| | |
| | | private String orderByDesc; |
| | | |
| | | |
| | | private String itemId; |
| | | |
| | | |
| | | public String getEventId() { |
| | | return eventId; |
| | | } |
| | |
| | | public void setOrderByDesc(String orderByDesc) { |
| | | this.orderByDesc = orderByDesc; |
| | | } |
| | | |
| | | public String getItemId() { |
| | | return itemId; |
| | | } |
| | | |
| | | public void setItemId(String itemId) { |
| | | this.itemId = itemId; |
| | | } |
| | | } |
| | |
| | | package com.java110.dto.workPool; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.workPoolContent.WorkPoolContentDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | |
| | | private String periodDay; |
| | | |
| | | private String periodWorkday; |
| | | |
| | | private List<WorkPoolContentDto> contents; |
| | | |
| | | public String getWorkCycle() { |
| | | return workCycle; |
| | |
| | | this.periodWorkday = periodWorkday; |
| | | } |
| | | |
| | | public List<WorkPoolContentDto> getContents() { |
| | | return contents; |
| | | } |
| | | |
| | | public void setContents(List<WorkPoolContentDto> contents) { |
| | | this.contents = contents; |
| | | } |
| | | } |
| | |
| | | **/ |
| | | public class WorkPoolContentDto extends PageDto implements Serializable { |
| | | |
| | | public static final String STATE_WAIT = "W"; |
| | | |
| | | public static final String STATE_COMPLETE = "C"; |
| | | private String contentId; |
| | | private String communityId; |
| | | private String storeId; |
| | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private String queryStartTime; |
| | | private String queryEndTime; |
| | | |
| | | private String itemId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | |
| | | public void setQueryEndTime(String queryEndTime) { |
| | | this.queryEndTime = queryEndTime; |
| | | } |
| | | |
| | | public String getItemId() { |
| | | return itemId; |
| | | } |
| | | |
| | | public void setItemId(String itemId) { |
| | | this.itemId = itemId; |
| | | } |
| | | } |
| | |
| | | private String staffName; |
| | | private String startTime; |
| | | private String state; |
| | | |
| | | private String[] states; |
| | | private String stateName; |
| | | private String endTime; |
| | | |
| | |
| | | public void setOrgStaffName(String orgStaffName) { |
| | | this.orgStaffName = orgStaffName; |
| | | } |
| | | |
| | | public String[] getStates() { |
| | | return states; |
| | | } |
| | | |
| | | public void setStates(String[] states) { |
| | | this.states = states; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.workTaskItem; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.workPoolContent.WorkPoolContentDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 工作任务明细数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class WorkTaskItemDto extends WorkPoolContentDto implements Serializable { |
| | | |
| | | private String deductionPersonId; |
| | | private String finishTime; |
| | | private String deductionPersonName; |
| | | private String deductionMoney; |
| | | private String contentId; |
| | | private String storeId; |
| | | private String workId; |
| | | private String deductionReason; |
| | | private String itemId; |
| | | private String state; |
| | | private String communityId; |
| | | private String taskId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getDeductionPersonId() { |
| | | return deductionPersonId; |
| | | } |
| | | |
| | | public void setDeductionPersonId(String deductionPersonId) { |
| | | this.deductionPersonId = deductionPersonId; |
| | | } |
| | | |
| | | public String getFinishTime() { |
| | | return finishTime; |
| | | } |
| | | |
| | | public void setFinishTime(String finishTime) { |
| | | this.finishTime = finishTime; |
| | | } |
| | | |
| | | public String getDeductionPersonName() { |
| | | return deductionPersonName; |
| | | } |
| | | |
| | | public void setDeductionPersonName(String deductionPersonName) { |
| | | this.deductionPersonName = deductionPersonName; |
| | | } |
| | | |
| | | public String getDeductionMoney() { |
| | | return deductionMoney; |
| | | } |
| | | |
| | | public void setDeductionMoney(String deductionMoney) { |
| | | this.deductionMoney = deductionMoney; |
| | | } |
| | | |
| | | public String getContentId() { |
| | | return contentId; |
| | | } |
| | | |
| | | public void setContentId(String contentId) { |
| | | this.contentId = contentId; |
| | | } |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | |
| | | public String getWorkId() { |
| | | return workId; |
| | | } |
| | | |
| | | public void setWorkId(String workId) { |
| | | this.workId = workId; |
| | | } |
| | | |
| | | public String getDeductionReason() { |
| | | return deductionReason; |
| | | } |
| | | |
| | | public void setDeductionReason(String deductionReason) { |
| | | this.deductionReason = deductionReason; |
| | | } |
| | | |
| | | public String getItemId() { |
| | | return itemId; |
| | | } |
| | | |
| | | public void setItemId(String itemId) { |
| | | this.itemId = itemId; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getTaskId() { |
| | | return taskId; |
| | | } |
| | | |
| | | public void setTaskId(String taskId) { |
| | | this.taskId = taskId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| | |
| | | private String workId; |
| | | private String staffId; |
| | | |
| | | private String itemId; |
| | | |
| | | public String getEventId() { |
| | | return eventId; |
| | | } |
| | |
| | | this.staffId = staffId; |
| | | } |
| | | |
| | | public String getItemId() { |
| | | return itemId; |
| | | } |
| | | |
| | | public void setItemId(String itemId) { |
| | | this.itemId = itemId; |
| | | } |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体 |
| | | * add by 吴学文 at 2023-12-25 15:45:56 mail: 928255095@qq.com |
| | |
| | | private String storeId; |
| | | private String workId; |
| | | private String content; |
| | | |
| | | |
| | | |
| | | |
| | | public String getContentId() { |
| | | return contentId; |
| | | } |
| | | |
| | | public void setContentId(String contentId) { |
| | | this.contentId = contentId; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | |
| | | public String getWorkId() { |
| | | return workId; |
| | | } |
| | | |
| | | public void setWorkId(String workId) { |
| | | this.workId = workId; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private String taskId; |
| | | private String fileType; |
| | | |
| | | private String itemId; |
| | | |
| | | |
| | | public String getPathUrl() { |
| | | return pathUrl; |
| | |
| | | public void setFileType(String fileType) { |
| | | this.fileType = fileType; |
| | | } |
| | | |
| | | public String getItemId() { |
| | | return itemId; |
| | | } |
| | | |
| | | public void setItemId(String itemId) { |
| | | this.itemId = itemId; |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.po.workTaskItem; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体 |
| | | * add by 吴学文 at 2024-10-31 00:45:24 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | public class WorkTaskItemPo implements Serializable { |
| | | |
| | | private String deductionPersonId; |
| | | private String finishTime; |
| | | private String deductionPersonName; |
| | | private String deductionMoney; |
| | | private String contentId; |
| | | private String statusCd = "0"; |
| | | private String storeId; |
| | | private String workId; |
| | | private String deductionReason; |
| | | private String itemId; |
| | | private String state; |
| | | private String communityId; |
| | | private String taskId; |
| | | public String getDeductionPersonId() { |
| | | return deductionPersonId; |
| | | } |
| | | public void setDeductionPersonId(String deductionPersonId) { |
| | | this.deductionPersonId = deductionPersonId; |
| | | } |
| | | public String getFinishTime() { |
| | | return finishTime; |
| | | } |
| | | public void setFinishTime(String finishTime) { |
| | | this.finishTime = finishTime; |
| | | } |
| | | public String getDeductionPersonName() { |
| | | return deductionPersonName; |
| | | } |
| | | public void setDeductionPersonName(String deductionPersonName) { |
| | | this.deductionPersonName = deductionPersonName; |
| | | } |
| | | public String getDeductionMoney() { |
| | | return deductionMoney; |
| | | } |
| | | public void setDeductionMoney(String deductionMoney) { |
| | | this.deductionMoney = deductionMoney; |
| | | } |
| | | public String getContentId() { |
| | | return contentId; |
| | | } |
| | | public void setContentId(String contentId) { |
| | | this.contentId = contentId; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getWorkId() { |
| | | return workId; |
| | | } |
| | | public void setWorkId(String workId) { |
| | | this.workId = workId; |
| | | } |
| | | public String getDeductionReason() { |
| | | return deductionReason; |
| | | } |
| | | public void setDeductionReason(String deductionReason) { |
| | | this.deductionReason = deductionReason; |
| | | } |
| | | public String getItemId() { |
| | | return itemId; |
| | | } |
| | | public void setItemId(String itemId) { |
| | | this.itemId = itemId; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getTaskId() { |
| | | return taskId; |
| | | } |
| | | public void setTaskId(String taskId) { |
| | | this.taskId = taskId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <!-- 保存工作单事件信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveWorkEventInfo" parameterType="Map"> |
| | | insert into work_event( |
| | | event_id,pre_staff_name,pre_staff_id,staff_name,remark,community_id,store_id,task_id,work_id,staff_id |
| | | event_id,pre_staff_name,pre_staff_id,staff_name,remark,community_id,store_id,task_id,work_id,staff_id,item_id |
| | | ) values ( |
| | | #{eventId},#{preStaffName},#{preStaffId},#{staffName},#{remark},#{communityId},#{storeId},#{taskId},#{workId},#{staffId} |
| | | #{eventId},#{preStaffName},#{preStaffId},#{staffName},#{remark},#{communityId},#{storeId},#{taskId},#{workId},#{staffId},#{itemId} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | preStaffName,t.pre_staff_id,t.pre_staff_id preStaffId,t.staff_name,t.staff_name |
| | | staffName,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id |
| | | communityId,t.store_id,t.store_id storeId,t.task_id,t.task_id taskId,t.work_id,t.work_id |
| | | workId,t.staff_id,t.staff_id staffId,t.create_time createTime,wt.start_time startTime,wt.end_time endTime |
| | | workId,t.staff_id,t.staff_id staffId,t.create_time createTime,wt.start_time startTime,wt.end_time endTime, |
| | | t.item_id itemId |
| | | from work_event t |
| | | left join work_task wt on t.task_id = wt.task_id |
| | | where 1 =1 |
| | |
| | | </if> |
| | | <if test="staffId !=null and staffId != ''"> |
| | | and t.staff_id= #{staffId} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="queryStartTime !=null and queryStartTime != ''"> |
| | | and t.create_time > #{queryStartTime} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | |
| | | <if test="staffId !=null and staffId != ''"> |
| | | and t.staff_id= #{staffId} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="queryStartTime !=null and queryStartTime != ''"> |
| | | and t.create_time > #{queryStartTime} |
| | | </if> |
| | |
| | | <if test="content !=null and content != ''"> |
| | | , t.content= #{content} |
| | | </if> |
| | | |
| | | where 1=1 |
| | | <if test="contentId !=null and contentId != ''"> |
| | | and t.content_id= #{contentId} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | |
| | | |
| | | </update> |
| | | |
| | |
| | | <if test="workId !=null and workId != ''"> |
| | | and t.work_id= #{workId} |
| | | </if> |
| | | |
| | | <if test="content !=null and content != ''"> |
| | | and t.content= #{content} |
| | | </if> |
| | |
| | | |
| | | <!-- 保存工作单文件信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveWorkPoolFileInfo" parameterType="Map"> |
| | | insert into work_pool_file(path_url, community_id, store_id, work_id, file_id, task_id, file_type) |
| | | values (#{pathUrl}, #{communityId}, #{storeId}, #{workId}, #{fileId}, #{taskId}, #{fileType}) |
| | | insert into work_pool_file(path_url, community_id, store_id, work_id, file_id, task_id, file_type,item_id) |
| | | values (#{pathUrl}, #{communityId}, #{storeId}, #{workId}, #{fileId}, #{taskId}, #{fileType},#{itemId}) |
| | | </insert> |
| | | |
| | | <!-- 查询工作单文件信息 add by wuxw 2018-07-03 --> |
| | |
| | | select t.path_url,t.path_url pathUrl,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id |
| | | communityId,t.store_id,t.store_id storeId,t.work_id,t.work_id workId,t.file_id,t.file_id fileId,t.task_id |
| | | taskId, |
| | | t.file_type fileType,wt.staff_name staffName |
| | | t.file_type fileType,wt.staff_name staffName,t.item_id itemId |
| | | from work_pool_file t |
| | | left join work_task wt on t.task_id = wt.task_id and wt.status_cd = '0' |
| | | where 1 =1 |
| | |
| | | </if> |
| | | <if test="fileType !=null and fileType != ''"> |
| | | and t.file_type= #{fileType} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="staffNameLike !=null and staffNameLike != ''"> |
| | | and wt.staff_name like concat('%', #{staffNameLike},'%') |
| | |
| | | <if test="fileType !=null and fileType != ''"> |
| | | and t.file_type= #{fileType} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="staffNameLike !=null and staffNameLike != ''"> |
| | | and wt.staff_name like concat('%', #{staffNameLike},'%') |
| | | </if> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="workTaskItemV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存工作任务明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveWorkTaskItemInfo" parameterType="Map"> |
| | | insert into work_task_item( |
| | | deduction_person_id,finish_time,deduction_person_name,deduction_money,content_id,store_id,work_id,deduction_reason,item_id,state,community_id,task_id |
| | | ) values ( |
| | | #{deductionPersonId},#{finishTime},#{deductionPersonName},#{deductionMoney},#{contentId},#{storeId},#{workId},#{deductionReason},#{itemId},#{state},#{communityId},#{taskId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询工作任务明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getWorkTaskItemInfo" parameterType="Map" resultType="Map"> |
| | | select t.deduction_person_id deductionPersonId,t.finish_time finishTime,t.deduction_person_name |
| | | deductionPersonName,t.deduction_money deductionMoney,t.content_id contentId,t.status_cd statusCd,t.store_id |
| | | storeId,t.work_id workId,t.deduction_reason deductionReason,t.item_id itemId,t.state,t.community_id |
| | | communityId,t.task_id taskId,wpc.content |
| | | from work_task_item t |
| | | left join work_pool_content wpc on t.content_id = wpc.content_id and wpc.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="deductionPersonId !=null and deductionPersonId != ''"> |
| | | and t.deduction_person_id= #{deductionPersonId} |
| | | </if> |
| | | <if test="finishTime !=null and finishTime != ''"> |
| | | and t.finish_time= #{finishTime} |
| | | </if> |
| | | <if test="deductionPersonName !=null and deductionPersonName != ''"> |
| | | and t.deduction_person_name= #{deductionPersonName} |
| | | </if> |
| | | <if test="deductionMoney !=null and deductionMoney != ''"> |
| | | and t.deduction_money= #{deductionMoney} |
| | | </if> |
| | | <if test="contentId !=null and contentId != ''"> |
| | | and t.content_id= #{contentId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="workId !=null and workId != ''"> |
| | | and t.work_id= #{workId} |
| | | </if> |
| | | <if test="deductionReason !=null and deductionReason != ''"> |
| | | and t.deduction_reason= #{deductionReason} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改工作任务明细信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateWorkTaskItemInfo" parameterType="Map"> |
| | | update work_task_item t set t.status_cd = #{statusCd} |
| | | |
| | | <if test="deductionPersonId !=null and deductionPersonId != ''"> |
| | | , t.deduction_person_id= #{deductionPersonId} |
| | | </if> |
| | | <if test="finishTime !=null and finishTime != ''"> |
| | | , t.finish_time= #{finishTime} |
| | | </if> |
| | | <if test="deductionPersonName !=null and deductionPersonName != ''"> |
| | | , t.deduction_person_name= #{deductionPersonName} |
| | | </if> |
| | | <if test="deductionMoney !=null and deductionMoney != ''"> |
| | | , t.deduction_money= #{deductionMoney} |
| | | </if> |
| | | |
| | | <if test="workId !=null and workId != ''"> |
| | | , t.work_id= #{workId} |
| | | </if> |
| | | <if test="deductionReason !=null and deductionReason != ''"> |
| | | , t.deduction_reason= #{deductionReason} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | |
| | | |
| | | where 1=1 |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="contentId !=null and contentId != ''"> |
| | | and t.content_id= #{contentId} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询工作任务明细数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryWorkTaskItemsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from work_task_item t |
| | | where 1 =1 |
| | | <if test="deductionPersonId !=null and deductionPersonId != ''"> |
| | | and t.deduction_person_id= #{deductionPersonId} |
| | | </if> |
| | | <if test="finishTime !=null and finishTime != ''"> |
| | | and t.finish_time= #{finishTime} |
| | | </if> |
| | | <if test="deductionPersonName !=null and deductionPersonName != ''"> |
| | | and t.deduction_person_name= #{deductionPersonName} |
| | | </if> |
| | | <if test="deductionMoney !=null and deductionMoney != ''"> |
| | | and t.deduction_money= #{deductionMoney} |
| | | </if> |
| | | <if test="contentId !=null and contentId != ''"> |
| | | and t.content_id= #{contentId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="workId !=null and workId != ''"> |
| | | and t.work_id= #{workId} |
| | | </if> |
| | | <if test="deductionReason !=null and deductionReason != ''"> |
| | | and t.deduction_reason= #{deductionReason} |
| | | </if> |
| | | <if test="itemId !=null and itemId != ''"> |
| | | and t.item_id= #{itemId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="states !=null "> |
| | | and t.state in |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="staffId !=null and staffId != ''"> |
| | | and t.staff_id= #{staffId} |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="states !=null "> |
| | | and t.state in |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="staffId !=null and staffId != ''"> |
| | | and t.staff_id= #{staffId} |
| | | </if> |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.intf.oa; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.workTaskItem.WorkTaskItemDto; |
| | | import com.java110.po.workTaskItem.WorkTaskItemPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用 |
| | | * add by 吴学文 at 2024-10-31 00:45:24 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @FeignClient(name = "oa-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/workTaskItemV1Api") |
| | | public interface IWorkTaskItemV1InnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveWorkTaskItem", method = RequestMethod.POST) |
| | | public int saveWorkTaskItem(@RequestBody WorkTaskItemPo workTaskItemPo); |
| | | |
| | | @RequestMapping(value = "/updateWorkTaskItem", method = RequestMethod.POST) |
| | | public int updateWorkTaskItem(@RequestBody WorkTaskItemPo workTaskItemPo); |
| | | |
| | | @RequestMapping(value = "/deleteWorkTaskItem", method = RequestMethod.POST) |
| | | public int deleteWorkTaskItem(@RequestBody WorkTaskItemPo workTaskItemPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param workTaskItemDto 数据对象分享 |
| | | * @return WorkTaskItemDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryWorkTaskItems", method = RequestMethod.POST) |
| | | List<WorkTaskItemDto> queryWorkTaskItems(@RequestBody WorkTaskItemDto workTaskItemDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param workTaskItemDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryWorkTaskItemsCount", method = RequestMethod.POST) |
| | | int queryWorkTaskItemsCount(@RequestBody WorkTaskItemDto workTaskItemDto); |
| | | } |
| | |
| | | import com.java110.dto.workPool.WorkPoolDto; |
| | | import com.java110.dto.workPoolFile.WorkPoolFileDto; |
| | | import com.java110.dto.workTask.WorkTaskDto; |
| | | import com.java110.intf.oa.IWorkEventV1InnerServiceSMO; |
| | | import com.java110.intf.oa.IWorkPoolFileV1InnerServiceSMO; |
| | | import com.java110.intf.oa.IWorkPoolV1InnerServiceSMO; |
| | | import com.java110.intf.oa.IWorkTaskV1InnerServiceSMO; |
| | | import com.java110.dto.workTaskItem.WorkTaskItemDto; |
| | | import com.java110.intf.oa.*; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.workEvent.WorkEventPo; |
| | | import com.java110.po.workPool.WorkPoolPo; |
| | | import com.java110.po.workPoolFile.WorkPoolFilePo; |
| | | import com.java110.po.workTask.WorkTaskPo; |
| | | import com.java110.po.workTaskItem.WorkTaskItemPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | private IWorkTaskV1InnerServiceSMO workTaskV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IWorkTaskItemV1InnerServiceSMO workTaskItemV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IWorkEventV1InnerServiceSMO workEventV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "taskId", "未包含任务"); |
| | | Assert.hasKeyAndValue(reqJson, "itemId", "未包含内容"); |
| | | Assert.hasKeyAndValue(reqJson, "auditCode", "未包含状态"); |
| | | Assert.hasKeyAndValue(reqJson, "auditMessage", "未包含说明"); |
| | | |
| | |
| | | workPoolFilePo.setTaskId(workTaskDtos.get(0).getTaskId()); |
| | | workPoolFilePo.setPathUrl(reqJson.getString("pathUrl")); |
| | | workPoolFilePo.setStoreId(workTaskDtos.get(0).getStoreId()); |
| | | workPoolFilePo.setItemId(reqJson.getString("itemId")); |
| | | workPoolFileV1InnerServiceSMOImpl.saveWorkPoolFile(workPoolFilePo); |
| | | |
| | | } |
| | |
| | | taskTimeout = "Y"; |
| | | } |
| | | |
| | | String orderState = WorkPoolDto.STATE_DOING; |
| | | |
| | | |
| | | //todo 完成任务 |
| | | |
| | | WorkTaskPo workTaskPo = new WorkTaskPo(); |
| | | workTaskPo.setState(WorkPoolDto.STATE_COMPLETE); |
| | | workTaskPo.setState(orderState); |
| | | workTaskPo.setTaskId(workTaskDto.getTaskId()); |
| | | workTaskPo.setStoreId(workTaskDto.getStoreId()); |
| | | workTaskPo.setFinishTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | workTaskPo.setTaskTimeout(taskTimeout); |
| | | // workTaskPo.setFinishTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | // workTaskPo.setTaskTimeout(taskTimeout); |
| | | workTaskV1InnerServiceSMOImpl.updateWorkTask(workTaskPo); |
| | | |
| | | WorkTaskItemPo workTaskItemPo = new WorkTaskItemPo(); |
| | | workTaskItemPo.setItemId(reqJson.getString("itemId")); |
| | | workTaskItemPo.setState(WorkTaskDto.STATE_COMPLETE); |
| | | workTaskItemPo.setTaskId(workTaskDto.getTaskId()); |
| | | workTaskItemPo.setFinishTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | |
| | | workTaskItemV1InnerServiceSMOImpl.updateWorkTaskItem(workTaskItemPo); |
| | | |
| | | //todo 查询 工作单 |
| | | WorkPoolDto workPoolDto = new WorkPoolDto(); |
| | |
| | | workEventPo.setStaffName(workTaskDto.getStaffName()); |
| | | workEventPo.setStoreId(workTaskDto.getStoreId()); |
| | | workEventPo.setTaskId(workTaskDto.getTaskId()); |
| | | workEventPo.setItemId(reqJson.getString("itemId")); |
| | | workEventV1InnerServiceSMOImpl.saveWorkEvent(workEventPo); |
| | | |
| | | // todo 查询 任务明细是否处理完成 |
| | | WorkTaskItemDto workTaskItemDto = new WorkTaskItemDto(); |
| | | workTaskItemDto.setTaskId(workTaskDto.getTaskId()); |
| | | workTaskItemDto.setCommunityId(workTaskDto.getCommunityId()); |
| | | workTaskItemDto.setState(WorkTaskDto.STATE_WAIT); |
| | | int count = workTaskItemV1InnerServiceSMOImpl.queryWorkTaskItemsCount(workTaskItemDto); |
| | | if (count > 0) { |
| | | WorkPoolPo workPoolPo = new WorkPoolPo(); |
| | | workPoolPo.setWorkId(workTaskDto.getWorkId()); |
| | | workPoolPo.setState(WorkPoolDto.STATE_DOING); |
| | | workPoolV1InnerServiceSMOImpl.updateWorkPool(workPoolPo); |
| | | return; |
| | | } |
| | | |
| | | workTaskPo = new WorkTaskPo(); |
| | | workTaskPo.setTaskId(workTaskDto.getTaskId()); |
| | | workTaskPo.setState(WorkTaskDto.STATE_COMPLETE); |
| | | workTaskPo.setFinishTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | workTaskPo.setTaskTimeout(taskTimeout); |
| | | workTaskV1InnerServiceSMOImpl.updateWorkTask(workTaskPo); |
| | | |
| | | //todo 查询 工单任务 |
| | | |
| | | WorkTaskDto tmpWorkTaskDto = new WorkTaskDto(); |
| | | tmpWorkTaskDto.setWorkId(workTaskDto.getWorkId()); |
| | | tmpWorkTaskDto.setStoreId(workTaskDto.getStoreId()); |
| | | tmpWorkTaskDto.setState(WorkTaskDto.STATE_WAIT); |
| | | tmpWorkTaskDto.setStates(new String[]{WorkTaskDto.STATE_WAIT,WorkTaskDto.STATE_DOING}); |
| | | int waitCount = workTaskV1InnerServiceSMOImpl.queryWorkTasksCount(tmpWorkTaskDto); |
| | | WorkPoolPo workPoolPo = new WorkPoolPo(); |
| | | workPoolPo.setWorkId(workTaskDto.getWorkId()); |
| | |
| | | workEventPo.setStaffName(workTaskDto.getStaffName()); |
| | | workEventPo.setStoreId(workTaskDto.getStoreId()); |
| | | workEventPo.setTaskId(workTaskDto.getTaskId()); |
| | | workEventPo.setItemId("-1"); |
| | | workEventV1InnerServiceSMOImpl.saveWorkEvent(workEventPo); |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | if (workPoolDtos.size() != 1) { |
| | | if (workPoolDtos.size() > 1) { |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | workPoolDtos.get(0).setContent(workPoolContentDtos.get(0).getContent()); |
| | | |
| | | workPoolDtos.get(0).setContents(workPoolContentDtos); |
| | | |
| | | WorkPoolFileDto workPoolFileDto = new WorkPoolFileDto(); |
| | | workPoolFileDto.setWorkId(workPoolDtos.get(0).getWorkId()); |
| | | workPoolFileDto.setFileType(WorkPoolFileDto.FILE_TYPE_START); |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.oa.cmd.work; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.intf.oa.IWorkTaskItemV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.java110.dto.workTaskItem.WorkTaskItemDto; |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:workTaskItem.listWorkTaskItem |
| | | * 请求路劲:/app/workTaskItem.ListWorkTaskItem |
| | | * add by 吴学文 at 2024-10-31 00:45:24 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "task.listWorkTaskItem") |
| | | public class ListWorkTaskItemCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListWorkTaskItemCmd.class); |
| | | @Autowired |
| | | private IWorkTaskItemV1InnerServiceSMO workTaskItemV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | WorkTaskItemDto workTaskItemDto = BeanConvertUtil.covertBean(reqJson, WorkTaskItemDto.class); |
| | | |
| | | int count = workTaskItemV1InnerServiceSMOImpl.queryWorkTaskItemsCount(workTaskItemDto); |
| | | |
| | | List<WorkTaskItemDto> workTaskItemDtos = null; |
| | | |
| | | if (count > 0) { |
| | | workTaskItemDtos = workTaskItemV1InnerServiceSMOImpl.queryWorkTaskItems(workTaskItemDto); |
| | | } else { |
| | | workTaskItemDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, workTaskItemDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | workPoolDtos.get(0).setContent(workPoolContentDtos.get(0).getContent()); |
| | | workPoolDtos.get(0).setContents(workPoolContentDtos); |
| | | |
| | | WorkPoolFileDto workPoolFileDto = new WorkPoolFileDto(); |
| | | workPoolFileDto.setWorkId(workPoolDtos.get(0).getWorkId()); |
| | |
| | | import com.java110.dto.workCopy.WorkCopyDto; |
| | | import com.java110.dto.workCycle.WorkCycleDto; |
| | | import com.java110.dto.workPool.WorkPoolDto; |
| | | import com.java110.dto.workPoolContent.WorkPoolContentDto; |
| | | import com.java110.dto.workPoolFile.WorkPoolFileDto; |
| | | import com.java110.dto.workTask.WorkTaskDto; |
| | | import com.java110.intf.oa.*; |
| | |
| | | import com.java110.po.workPoolContent.WorkPoolContentPo; |
| | | import com.java110.po.workPoolFile.WorkPoolFilePo; |
| | | import com.java110.po.workTask.WorkTaskPo; |
| | | import com.java110.po.workTaskItem.WorkTaskItemPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.*; |
| | | import com.java110.vo.ResultVo; |
| | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IWorkTaskItemV1InnerServiceSMO workTaskItemV1InnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * {"workName":"关于扫雪任务","workTypes":[],"wtId":"102023122586210045", |
| | | * "workCycle":"1001","startTime":"2023-12-26 14:20:17","endTime":"2023-12-27 14:20:17", |
| | |
| | | throw new CmdException("未包含处理人"); |
| | | } |
| | | JSONArray staffs = reqJson.getJSONArray("staffs"); |
| | | if (staffs == null || staffs.isEmpty()) { |
| | | if (ListUtil.isNull(staffs)) { |
| | | throw new CmdException("未包含处理人"); |
| | | } |
| | | |
| | | if (!reqJson.containsKey("contents")) { |
| | | throw new CmdException("未包含工作单内容"); |
| | | } |
| | | |
| | | JSONArray contents = reqJson.getJSONArray("contents"); |
| | | |
| | | if (ListUtil.isNull(contents)) { |
| | | throw new CmdException("内容为空"); |
| | | } |
| | | |
| | | if (WorkPoolDto.WORK_CYCLE_ONE.equals(reqJson.getString("workCycle"))) { |
| | | return; |
| | | } |
| | |
| | | Date sTime = DateUtil.getDateFromStringA(startTime); |
| | | endTime = DateUtil.getAddHoursStringA(sTime, reqJson.getIntValue("hours")); |
| | | } |
| | | |
| | | JSONArray contents = reqJson.getJSONArray("contents"); |
| | | |
| | | for (int staffIndex = 0; staffIndex < staffs.size(); staffIndex++) { |
| | | WorkTaskPo workTaskPo = new WorkTaskPo(); |
| | | workTaskPo.setWorkId(workPoolPo.getWorkId()); |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | | } |
| | | JSONObject content = null; |
| | | for (int cIndex = 0; cIndex < contents.size(); cIndex++) { |
| | | content = contents.getJSONObject(cIndex); |
| | | WorkTaskItemPo workTaskItemPo = new WorkTaskItemPo(); |
| | | workTaskItemPo.setDeductionMoney("0"); |
| | | workTaskItemPo.setContentId(content.getString("contentId")); |
| | | workTaskItemPo.setStoreId(workPoolPo.getStoreId()); |
| | | workTaskItemPo.setWorkId(workPoolPo.getWorkId()); |
| | | workTaskItemPo.setItemId(GenerateCodeFactory.getGeneratorId("11")); |
| | | workTaskItemPo.setState(WorkTaskDto.STATE_WAIT); |
| | | workTaskItemPo.setCommunityId(workPoolPo.getCommunityId()); |
| | | workTaskItemPo.setTaskId(workTaskPo.getTaskId()); |
| | | workTaskItemV1InnerServiceSMOImpl.saveWorkTaskItem(workTaskItemPo); |
| | | } |
| | | |
| | | if (StringUtil.isEmpty(reqJson.getString("pathUrl"))) { |
| | | continue; |
| | | } |
| | |
| | | * @param userDto |
| | | */ |
| | | private void saveContent(WorkPoolPo workPoolPo, JSONObject reqJson, UserDto userDto) { |
| | | |
| | | JSONArray contents = reqJson.getJSONArray("contents"); |
| | | JSONObject content = null; |
| | | for (int cIndex = 0; cIndex < contents.size(); cIndex++) { |
| | | content = contents.getJSONObject(cIndex); |
| | | WorkPoolContentPo workPoolContentPo = new WorkPoolContentPo(); |
| | | workPoolContentPo.setContentId(GenerateCodeFactory.getGeneratorId("11")); |
| | | workPoolContentPo.setContent(reqJson.getString("content")); |
| | | workPoolContentPo.setContent(content.getString("content")); |
| | | workPoolContentPo.setWorkId(workPoolPo.getWorkId()); |
| | | workPoolContentPo.setCommunityId(reqJson.getString("communityId")); |
| | | workPoolContentPo.setStoreId(reqJson.getString("storeId")); |
| | | content.put("contentId", workPoolContentPo.getContentId()); |
| | | workPoolContentV1InnerServiceSMOImpl.saveWorkPoolContent(workPoolContentPo); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.java110.dto.workCopy.WorkCopyDto; |
| | | import com.java110.dto.workCycle.WorkCycleDto; |
| | | import com.java110.dto.workPool.WorkPoolDto; |
| | | import com.java110.dto.workPoolContent.WorkPoolContentDto; |
| | | import com.java110.dto.workPoolFile.WorkPoolFileDto; |
| | | import com.java110.dto.workTask.WorkTaskDto; |
| | | import com.java110.intf.oa.*; |
| | |
| | | JSONArray staffs = reqJson.getJSONArray("staffs"); |
| | | if (staffs == null || staffs.isEmpty()) { |
| | | throw new CmdException("未包含处理人"); |
| | | } |
| | | |
| | | if (!reqJson.containsKey("contents")) { |
| | | throw new CmdException("未包含工作单内容"); |
| | | } |
| | | |
| | | JSONArray contents = reqJson.getJSONArray("contents"); |
| | | |
| | | if (ListUtil.isNull(contents)) { |
| | | throw new CmdException("内容为空"); |
| | | } |
| | | |
| | | if (WorkPoolDto.WORK_CYCLE_ONE.equals(reqJson.getString("workCycle"))) { |
| | |
| | | workPoolContentPo.setWorkId(workPoolPo.getWorkId()); |
| | | workPoolContentPo.setStoreId(workPoolPo.getStoreId()); |
| | | workPoolContentV1InnerServiceSMOImpl.deleteWorkPoolContent(workPoolContentPo); |
| | | |
| | | JSONArray contents = reqJson.getJSONArray("contents"); |
| | | JSONObject content = null; |
| | | for(int cIndex = 0;cIndex < contents.size();cIndex ++) { |
| | | content = contents.getJSONObject(cIndex); |
| | | workPoolContentPo = new WorkPoolContentPo(); |
| | | workPoolContentPo.setContentId(GenerateCodeFactory.getGeneratorId("11")); |
| | | workPoolContentPo.setContent(reqJson.getString("content")); |
| | | workPoolContentPo.setContent(content.getString("content")); |
| | | workPoolContentPo.setWorkId(workPoolPo.getWorkId()); |
| | | workPoolContentPo.setCommunityId(reqJson.getString("communityId")); |
| | | workPoolContentPo.setStoreId(reqJson.getString("storeId")); |
| | | workPoolContentV1InnerServiceSMOImpl.saveWorkPoolContent(workPoolContentPo); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.oa.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类表述: |
| | | * add by 吴学文 at 2024-10-31 00:45:24 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | public interface IWorkTaskItemV1ServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 工作任务明细信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveWorkTaskItemInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询工作任务明细信息(instance过程) |
| | | * 根据bId 查询工作任务明细信息 |
| | | * @param info bId 信息 |
| | | * @return 工作任务明细信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getWorkTaskItemInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改工作任务明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int updateWorkTaskItemInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询工作任务明细总数 |
| | | * |
| | | * @param info 工作任务明细信息 |
| | | * @return 工作任务明细数量 |
| | | */ |
| | | int queryWorkTaskItemsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.oa.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.oa.dao.IWorkTaskItemV1ServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类表述: |
| | | * add by 吴学文 at 2024-10-31 00:45:24 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Service("workTaskItemV1ServiceDaoImpl") |
| | | public class WorkTaskItemV1ServiceDaoImpl extends BaseServiceDao implements IWorkTaskItemV1ServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(WorkTaskItemV1ServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存工作任务明细信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int saveWorkTaskItemInfo(Map info) throws DAOException { |
| | | logger.debug("保存 saveWorkTaskItemInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("workTaskItemV1ServiceDaoImpl.saveWorkTaskItemInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询工作任务明细信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getWorkTaskItemInfo(Map info) throws DAOException { |
| | | logger.debug("查询 getWorkTaskItemInfo 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("workTaskItemV1ServiceDaoImpl.getWorkTaskItemInfo",info); |
| | | |
| | | return infos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改工作任务明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int updateWorkTaskItemInfo(Map info) throws DAOException { |
| | | logger.debug("修改 updateWorkTaskItemInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("workTaskItemV1ServiceDaoImpl.updateWorkTaskItemInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * 查询工作任务明细数量 |
| | | * @param info 工作任务明细信息 |
| | | * @return 工作任务明细数量 |
| | | */ |
| | | @Override |
| | | public int queryWorkTaskItemsCount(Map info) { |
| | | logger.debug("查询 queryWorkTaskItemsCount 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("workTaskItemV1ServiceDaoImpl.queryWorkTaskItemsCount", info); |
| | | if (infos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.oa.smo.impl; |
| | | |
| | | |
| | | import com.java110.oa.dao.IWorkTaskItemV1ServiceDao; |
| | | import com.java110.intf.oa.IWorkTaskItemV1InnerServiceSMO; |
| | | import com.java110.dto.workTaskItem.WorkTaskItemDto; |
| | | import com.java110.po.workTaskItem.WorkTaskItemPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用 |
| | | * add by 吴学文 at 2024-10-31 00:45:24 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @RestController |
| | | public class WorkTaskItemV1InnerServiceSMOImpl extends BaseServiceSMO implements IWorkTaskItemV1InnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IWorkTaskItemV1ServiceDao workTaskItemV1ServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveWorkTaskItem(@RequestBody WorkTaskItemPo workTaskItemPo) { |
| | | int saveFlag = workTaskItemV1ServiceDaoImpl.saveWorkTaskItemInfo(BeanConvertUtil.beanCovertMap(workTaskItemPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateWorkTaskItem(@RequestBody WorkTaskItemPo workTaskItemPo) { |
| | | int saveFlag = workTaskItemV1ServiceDaoImpl.updateWorkTaskItemInfo(BeanConvertUtil.beanCovertMap(workTaskItemPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteWorkTaskItem(@RequestBody WorkTaskItemPo workTaskItemPo) { |
| | | workTaskItemPo.setStatusCd("1"); |
| | | int saveFlag = workTaskItemV1ServiceDaoImpl.updateWorkTaskItemInfo(BeanConvertUtil.beanCovertMap(workTaskItemPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<WorkTaskItemDto> queryWorkTaskItems(@RequestBody WorkTaskItemDto workTaskItemDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = workTaskItemDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | workTaskItemDto.setPage((page - 1) * workTaskItemDto.getRow()); |
| | | } |
| | | |
| | | List<WorkTaskItemDto> workTaskItems = BeanConvertUtil.covertBeanList(workTaskItemV1ServiceDaoImpl.getWorkTaskItemInfo(BeanConvertUtil.beanCovertMap(workTaskItemDto)), WorkTaskItemDto.class); |
| | | |
| | | return workTaskItems; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryWorkTaskItemsCount(@RequestBody WorkTaskItemDto workTaskItemDto) { |
| | | return workTaskItemV1ServiceDaoImpl.queryWorkTaskItemsCount(BeanConvertUtil.beanCovertMap(workTaskItemDto)); } |
| | | |
| | | } |
| | |
| | | activiti: |
| | | database-schema-update: false |
| | | datasource: |
| | | url: jdbc:mysql://192.168.100.108:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false |
| | | url: jdbc:mysql://47.97.39.73:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false |
| | | username: TT |
| | | password: hc12345678 |
| | | type: com.alibaba.druid.pool.DruidDataSource |