| New file |
| | |
| | | package com.java110.dto.workflowDataFile; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description OA附件数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class WorkflowDataFileDto extends PageDto implements Serializable { |
| | | |
| | | private String fileName; |
| | | private String createUserId; |
| | | private String createUserName; |
| | | private String id; |
| | | private String realFileName; |
| | | private String storeId; |
| | | private String fileId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getFileName() { |
| | | return fileName; |
| | | } |
| | | public void setFileName(String fileName) { |
| | | this.fileName = fileName; |
| | | } |
| | | public String getCreateUserId() { |
| | | return createUserId; |
| | | } |
| | | public void setCreateUserId(String createUserId) { |
| | | this.createUserId = createUserId; |
| | | } |
| | | public String getCreateUserName() { |
| | | return createUserName; |
| | | } |
| | | public void setCreateUserName(String createUserName) { |
| | | this.createUserName = createUserName; |
| | | } |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | public String getRealFileName() { |
| | | return realFileName; |
| | | } |
| | | public void setRealFileName(String realFileName) { |
| | | this.realFileName = realFileName; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getFileId() { |
| | | return fileId; |
| | | } |
| | | public void setFileId(String fileId) { |
| | | this.fileId = fileId; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| 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.workflowDataFile; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体 |
| | | * add by 吴学文 at 2021-12-02 16:25:47 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 WorkflowDataFilePo implements Serializable { |
| | | |
| | | private String fileName; |
| | | private String createUserId; |
| | | private String createUserName; |
| | | private String statusCd = "0"; |
| | | private String id; |
| | | private String realFileName; |
| | | private String storeId; |
| | | private String fileId; |
| | | public String getFileName() { |
| | | return fileName; |
| | | } |
| | | public void setFileName(String fileName) { |
| | | this.fileName = fileName; |
| | | } |
| | | public String getCreateUserId() { |
| | | return createUserId; |
| | | } |
| | | public void setCreateUserId(String createUserId) { |
| | | this.createUserId = createUserId; |
| | | } |
| | | public String getCreateUserName() { |
| | | return createUserName; |
| | | } |
| | | public void setCreateUserName(String createUserName) { |
| | | this.createUserName = createUserName; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | public String getRealFileName() { |
| | | return realFileName; |
| | | } |
| | | public void setRealFileName(String realFileName) { |
| | | this.realFileName = realFileName; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getFileId() { |
| | | return fileId; |
| | | } |
| | | public void setFileId(String fileId) { |
| | | this.fileId = fileId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| 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="workflowDataFileV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存OA附件信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveWorkflowDataFileInfo" parameterType="Map"> |
| | | insert into oa_workflow_data_file( |
| | | file_name,create_user_id,create_user_name,id,real_file_name,store_id,file_id |
| | | ) values ( |
| | | #{fileName},#{createUserId},#{createUserName},#{id},#{realFileName},#{storeId},#{fileId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询OA附件信息 add by wuxw 2018-07-03 --> |
| | | <select id="getWorkflowDataFileInfo" parameterType="Map" resultType="Map"> |
| | | select t.file_name,t.file_name fileName,t.create_user_id,t.create_user_id |
| | | createUserId,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd |
| | | statusCd,t.id,t.real_file_name,t.real_file_name realFileName,t.store_id,t.store_id storeId,t.file_id,t.file_id |
| | | fileId |
| | | from oa_workflow_data_file t |
| | | where 1 =1 |
| | | <if test="fileName !=null and fileName != ''"> |
| | | and t.file_name= #{fileName} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="realFileName !=null and realFileName != ''"> |
| | | and t.real_file_name= #{realFileName} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="fileId !=null and fileId != ''"> |
| | | and t.file_id= #{fileId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改OA附件信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateWorkflowDataFileInfo" parameterType="Map"> |
| | | update oa_workflow_data_file t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="fileName !=null and fileName != ''"> |
| | | , t.file_name= #{fileName} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | , t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | , t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | , t.id= #{id} |
| | | </if> |
| | | <if test="realFileName !=null and realFileName != ''"> |
| | | , t.real_file_name= #{realFileName} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="fileId !=null and fileId != ''"> |
| | | and t.file_id= #{fileId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询OA附件数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryWorkflowDataFilesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from oa_workflow_data_file t |
| | | where 1 =1 |
| | | <if test="fileName !=null and fileName != ''"> |
| | | and t.file_name= #{fileName} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="realFileName !=null and realFileName != ''"> |
| | | and t.real_file_name= #{realFileName} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="fileId !=null and fileId != ''"> |
| | | and t.file_id= #{fileId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | public class TableToJson { |
| | | |
| | | //show create table c_orders 用这个语句获取 |
| | | public static final String createTableSql = "CREATE TABLE `u_user_attr` (\n" + |
| | | " `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',\n" + |
| | | " `attr_id` varchar(30) NOT NULL COMMENT '属性id',\n" + |
| | | " `user_id` varchar(30) NOT NULL COMMENT '用户ID',\n" + |
| | | " `spec_cd` varchar(12) NOT NULL COMMENT '规格id,参考spec表',\n" + |
| | | " `value` varchar(50) NOT NULL COMMENT '属性值',\n" + |
| | | " `b_id` varchar(30) NOT NULL COMMENT '业务ID',\n" + |
| | | public static final String createTableSql = "CREATE TABLE `oa_workflow_data_file` (\n" + |
| | | " `file_id` varchar(30) NOT NULL PRIMARY KEY COMMENT '主键ID',\n" + |
| | | " `id` varchar(30) not null COMMENT '对应表的ID',\n" + |
| | | " `file_name` varchar(512) DEFAULT NULL COMMENT '文件路径',\n" + |
| | | " `real_file_name` varchar(512) DEFAULT NULL COMMENT '真实文件名',\n" + |
| | | " `store_id` varchar(30) NOT NULL COMMENT '商户ID',\n" + |
| | | " `create_user_id` varchar(30) NOT NULL COMMENT '创建人ID',\n" + |
| | | " `create_user_name` varchar(64) NOT NULL COMMENT '创建人',\n" + |
| | | " `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" + |
| | | " `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0在用,1失效'\n" + |
| | | " `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效'\n" + |
| | | ")"; |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | String desc = "用户属性"; |
| | | String id = "userId"; |
| | | String name = "userAttr"; |
| | | String shareName = "user"; //生成到那个服务下 |
| | | String shareColumn = "user_id"; |
| | | String shareParam = "userId"; |
| | | String desc = "OA附件"; |
| | | String id = "fileId"; |
| | | String name = "workflowDataFile"; |
| | | String shareName = "oa"; //生成到那个服务下 |
| | | String shareColumn = "store_id"; |
| | | String shareParam = "storeId"; |
| | | //业务名称 desc 业务编码名称生成后类名 name 主键 id 需要放到那个服务 shareName |
| | | String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")")); |
| | | String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("(")); |
| | |
| | | { |
| | | "param": { |
| | | "attrId": "attr_id", |
| | | "specCd": "spec_cd", |
| | | "fileName": "file_name", |
| | | "createUserId": "create_user_id", |
| | | "createUserName": "create_user_name", |
| | | "statusCd": "status_cd", |
| | | "id": "id", |
| | | "userId": "user_id", |
| | | "value": "value" |
| | | "realFileName": "real_file_name", |
| | | "storeId": "store_id", |
| | | "fileId": "file_id" |
| | | }, |
| | | "name": "userAttr", |
| | | "shareColumn": "user_id", |
| | | "id": "userId", |
| | | "shareName": "user", |
| | | "name": "workflowDataFile", |
| | | "shareColumn": "store_id", |
| | | "id": "fileId", |
| | | "shareName": "oa", |
| | | "autoMove": true, |
| | | "required": [ |
| | | { |
| | | "msg": "id不能为空", |
| | | "msg": "主键ID不能为空", |
| | | "code": "fileId" |
| | | }, |
| | | { |
| | | "msg": "对应表的ID不能为空", |
| | | "code": "id" |
| | | }, |
| | | { |
| | | "msg": "属性id不能为空", |
| | | "code": "attrId" |
| | | "msg": "商户ID不能为空", |
| | | "code": "storeId" |
| | | }, |
| | | { |
| | | "msg": "用户ID不能为空", |
| | | "code": "userId" |
| | | }, |
| | | { |
| | | "msg": "规格id,参考spec表不能为空", |
| | | "code": "specCd" |
| | | }, |
| | | { |
| | | "msg": "属性值不能为空", |
| | | "code": "value" |
| | | }, |
| | | { |
| | | "msg": "数据状态不能为空", |
| | | "code": "statusCd" |
| | | "msg": "创建人不能为空", |
| | | "code": "createUserName" |
| | | } |
| | | ], |
| | | "desc": "用户属性", |
| | | "shareParam": "userId", |
| | | "tableName": "u_user_attr" |
| | | "desc": "OA附件", |
| | | "shareParam": "storeId", |
| | | "tableName": "oa_workflow_data_file" |
| | | } |
| 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.workflowDataFile.WorkflowDataFileDto; |
| | | import com.java110.po.workflowDataFile.WorkflowDataFilePo; |
| | | 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 2021-12-02 16:25:47 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("/workflowDataFileV1Api") |
| | | public interface IWorkflowDataFileV1InnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveWorkflowDataFile", method = RequestMethod.POST) |
| | | public int saveWorkflowDataFile(@RequestBody WorkflowDataFilePo workflowDataFilePo); |
| | | |
| | | @RequestMapping(value = "/updateWorkflowDataFile", method = RequestMethod.POST) |
| | | public int updateWorkflowDataFile(@RequestBody WorkflowDataFilePo workflowDataFilePo); |
| | | |
| | | @RequestMapping(value = "/deleteWorkflowDataFile", method = RequestMethod.POST) |
| | | public int deleteWorkflowDataFile(@RequestBody WorkflowDataFilePo workflowDataFilePo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param workflowDataFileDto 数据对象分享 |
| | | * @return WorkflowDataFileDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryWorkflowDataFiles", method = RequestMethod.POST) |
| | | List<WorkflowDataFileDto> queryWorkflowDataFiles(@RequestBody WorkflowDataFileDto workflowDataFileDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param workflowDataFileDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryWorkflowDataFilesCount", method = RequestMethod.POST) |
| | | int queryWorkflowDataFilesCount(@RequestBody WorkflowDataFileDto workflowDataFileDto); |
| | | } |
| | |
| | | sql.append("store_id varchar(30) not null COMMENT '商户ID',"); |
| | | sql.append("create_user_id varchar(30) not null COMMENT '创建人ID',"); |
| | | sql.append("create_user_name varchar(64) not null COMMENT '创建人',"); |
| | | sql.append("file varchar(512) COMMENT '附件地址',"); |
| | | sql.append("state varchar(12) not null COMMENT '状态 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结',"); |
| | | sql.append("create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',"); |
| | | sql.append("status_cd varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效'"); |
| | |
| | | if ("flowId".equals(key)) { |
| | | continue; |
| | | } |
| | | if("fileName".equals(key)){ |
| | | continue; |
| | | } |
| | | |
| | | if("realFileName".equals(key)){ |
| | | continue; |
| | | } |
| | | |
| | | columns.add(key); |
| | | values.add(reqJson.getString(key)); |
| | |
| | | import com.java110.dto.oaWorkflowData.OaWorkflowDataDto; |
| | | import com.java110.dto.oaWorkflowForm.OaWorkflowFormDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.workflowDataFile.WorkflowDataFileDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import com.java110.intf.common.IOaWorkflowUserInnerServiceSMO; |
| | | import com.java110.intf.oa.IOaWorkflowDataInnerServiceSMO; |
| | | import com.java110.intf.oa.IOaWorkflowFormInnerServiceSMO; |
| | | import com.java110.intf.oa.IOaWorkflowInnerServiceSMO; |
| | | import com.java110.intf.oa.IWorkflowDataFileV1InnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.oa.bmo.oaWorkflowForm.IGetOaWorkflowFormBMO; |
| | | import com.java110.po.workflowDataFile.WorkflowDataFilePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IOaWorkflowDataInnerServiceSMO oaWorkflowDataInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IWorkflowDataFileV1InnerServiceSMO workflowDataFileV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | /** |
| | |
| | | List<Map> datas = null; |
| | | if (count > 0) { |
| | | datas = oaWorkflowFormInnerServiceSMOImpl.queryOaWorkflowFormDatas(paramIn); |
| | | |
| | | } else { |
| | | datas = new ArrayList<>(); |
| | | } |
| | | |
| | | //查询file |
| | | queryFilesFromData(datas); |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (int) paramIn.get("row")), count, datas); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | private void queryFilesFromData(List<Map> datas) { |
| | | if (datas.size() != 1) { |
| | | return; |
| | | } |
| | | |
| | | WorkflowDataFileDto workflowDataFileDto = new WorkflowDataFileDto(); |
| | | workflowDataFileDto.setId(datas.get(0).get("id").toString()); |
| | | workflowDataFileDto.setStoreId(datas.get(0).get("store_id").toString()); |
| | | List<WorkflowDataFileDto> workflowDataFileDtos = workflowDataFileV1InnerServiceSMOImpl.queryWorkflowDataFiles(workflowDataFileDto); |
| | | |
| | | if (workflowDataFileDtos == null || workflowDataFileDtos.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | datas.get(0).put("files",workflowDataFileDtos); |
| | | } |
| | | |
| | | /** |
| | |
| | | throw new IllegalArgumentException("保存失败"); |
| | | } |
| | | |
| | | //判断是否有附件 |
| | | saveOaWorkflowFile(reqJson); |
| | | |
| | | reqJson.put("processDefinitionKey", oaWorkflowDtos.get(0).getProcessDefinitionKey()); |
| | | oaWorkflowUserInnerServiceSMOImpl.startProcess(reqJson); |
| | | |
| | | return ResultVo.success(); |
| | | } |
| | | |
| | | private void saveOaWorkflowFile(JSONObject reqJson) { |
| | | if (!reqJson.containsKey("fileName")) { |
| | | return; |
| | | } |
| | | |
| | | String fileName = reqJson.getString("fileName"); |
| | | if (StringUtil.isEmpty(fileName)) { |
| | | return; |
| | | } |
| | | |
| | | WorkflowDataFilePo workflowDataFilePo = new WorkflowDataFilePo(); |
| | | workflowDataFilePo.setCreateUserId(reqJson.getString("userId")); |
| | | workflowDataFilePo.setCreateUserName(reqJson.getString("createUserName")); |
| | | workflowDataFilePo.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | workflowDataFilePo.setFileName(reqJson.getString("fileName")); |
| | | workflowDataFilePo.setId(reqJson.getString("id")); |
| | | workflowDataFilePo.setRealFileName(reqJson.getString("realFileName")); |
| | | workflowDataFilePo.setStoreId(reqJson.getString("storeId")); |
| | | int flag = workflowDataFileV1InnerServiceSMOImpl.saveWorkflowDataFile(workflowDataFilePo); |
| | | if (flag < 1) { |
| | | throw new CmdException("保存附件失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询工作流待办 |
| | | * |
| 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.workflowDataFile; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.intf.oa.IWorkflowDataFileV1InnerServiceSMO; |
| | | import com.java110.po.workflowDataFile.WorkflowDataFilePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * 类表述:删除 |
| | | * 服务编码:workflowDataFile.deleteWorkflowDataFile |
| | | * 请求路劲:/app/workflowDataFile.DeleteWorkflowDataFile |
| | | * add by 吴学文 at 2021-12-02 16:25:47 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 = "workflowDataFile.deleteWorkflowDataFile") |
| | | public class DeleteWorkflowDataFileCmd extends AbstractServiceCmdListener { |
| | | private static Logger logger = LoggerFactory.getLogger(DeleteWorkflowDataFileCmd.class); |
| | | |
| | | @Autowired |
| | | private IWorkflowDataFileV1InnerServiceSMO workflowDataFileV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "fileId", "fileId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "storeId不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | WorkflowDataFilePo workflowDataFilePo = BeanConvertUtil.covertBean(reqJson, WorkflowDataFilePo.class); |
| | | int flag = workflowDataFileV1InnerServiceSMOImpl.deleteWorkflowDataFile(workflowDataFilePo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("删除数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| 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.workflowDataFile; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.workflowDataFile.WorkflowDataFileDto; |
| | | import com.java110.intf.oa.IWorkflowDataFileV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:workflowDataFile.listWorkflowDataFile |
| | | * 请求路劲:/app/workflowDataFile.ListWorkflowDataFile |
| | | * add by 吴学文 at 2021-12-02 16:25:47 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 = "workflowDataFile.listWorkflowDataFile") |
| | | public class ListWorkflowDataFileCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListWorkflowDataFileCmd.class); |
| | | @Autowired |
| | | private IWorkflowDataFileV1InnerServiceSMO workflowDataFileV1InnerServiceSMOImpl; |
| | | |
| | | @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 { |
| | | |
| | | WorkflowDataFileDto workflowDataFileDto = BeanConvertUtil.covertBean(reqJson, WorkflowDataFileDto.class); |
| | | |
| | | int count = workflowDataFileV1InnerServiceSMOImpl.queryWorkflowDataFilesCount(workflowDataFileDto); |
| | | |
| | | List<WorkflowDataFileDto> workflowDataFileDtos = null; |
| | | |
| | | if (count > 0) { |
| | | workflowDataFileDtos = workflowDataFileV1InnerServiceSMOImpl.queryWorkflowDataFiles(workflowDataFileDto); |
| | | } else { |
| | | workflowDataFileDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, workflowDataFileDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| 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.workflowDataFile; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.oa.IWorkflowDataFileV1InnerServiceSMO; |
| | | import com.java110.po.workflowDataFile.WorkflowDataFilePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * 类表述:保存 |
| | | * 服务编码:workflowDataFile.saveWorkflowDataFile |
| | | * 请求路劲:/app/workflowDataFile.SaveWorkflowDataFile |
| | | * add by 吴学文 at 2021-12-02 16:25:47 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 = "workflowDataFile.saveWorkflowDataFile") |
| | | public class SaveWorkflowDataFileCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveWorkflowDataFileCmd.class); |
| | | |
| | | public static final String CODE_PREFIX_ID = "10"; |
| | | |
| | | @Autowired |
| | | private IWorkflowDataFileV1InnerServiceSMO workflowDataFileV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "fileId", "请求报文中未包含fileId"); |
| | | Assert.hasKeyAndValue(reqJson, "id", "请求报文中未包含id"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | Assert.hasKeyAndValue(reqJson, "createUserName", "请求报文中未包含createUserName"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | WorkflowDataFilePo workflowDataFilePo = BeanConvertUtil.covertBean(reqJson, WorkflowDataFilePo.class); |
| | | workflowDataFilePo.setFileId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | int flag = workflowDataFileV1InnerServiceSMOImpl.saveWorkflowDataFile(workflowDataFilePo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| 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.workflowDataFile; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.intf.oa.IWorkflowDataFileV1InnerServiceSMO; |
| | | import com.java110.po.workflowDataFile.WorkflowDataFilePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | |
| | | /** |
| | | * 类表述:更新 |
| | | * 服务编码:workflowDataFile.updateWorkflowDataFile |
| | | * 请求路劲:/app/workflowDataFile.UpdateWorkflowDataFile |
| | | * add by 吴学文 at 2021-12-02 16:25:47 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 = "workflowDataFile.updateWorkflowDataFile") |
| | | public class UpdateWorkflowDataFileCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateWorkflowDataFileCmd.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IWorkflowDataFileV1InnerServiceSMO workflowDataFileV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "fileId", "fileId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "storeId不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | WorkflowDataFilePo workflowDataFilePo = BeanConvertUtil.covertBean(reqJson, WorkflowDataFilePo.class); |
| | | int flag = workflowDataFileV1InnerServiceSMOImpl.updateWorkflowDataFile(workflowDataFilePo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| 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 com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类表述: |
| | | * add by 吴学文 at 2021-12-02 16:25:47 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 IWorkflowDataFileV1ServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 OA附件信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveWorkflowDataFileInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询OA附件信息(instance过程) |
| | | * 根据bId 查询OA附件信息 |
| | | * @param info bId 信息 |
| | | * @return OA附件信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getWorkflowDataFileInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改OA附件信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int updateWorkflowDataFileInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询OA附件总数 |
| | | * |
| | | * @param info OA附件信息 |
| | | * @return OA附件数量 |
| | | */ |
| | | int queryWorkflowDataFilesCount(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.IWorkflowDataFileV1ServiceDao; |
| | | 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 2021-12-02 16:25:47 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("workflowDataFileV1ServiceDaoImpl") |
| | | public class WorkflowDataFileV1ServiceDaoImpl extends BaseServiceDao implements IWorkflowDataFileV1ServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(WorkflowDataFileV1ServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存OA附件信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int saveWorkflowDataFileInfo(Map info) throws DAOException { |
| | | logger.debug("保存 saveWorkflowDataFileInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("workflowDataFileV1ServiceDaoImpl.saveWorkflowDataFileInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询OA附件信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getWorkflowDataFileInfo(Map info) throws DAOException { |
| | | logger.debug("查询 getWorkflowDataFileInfo 入参 info : {}",info); |
| | | |
| | | List<Map> businessWorkflowDataFileInfos = sqlSessionTemplate.selectList("workflowDataFileV1ServiceDaoImpl.getWorkflowDataFileInfo",info); |
| | | |
| | | return businessWorkflowDataFileInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改OA附件信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int updateWorkflowDataFileInfo(Map info) throws DAOException { |
| | | logger.debug("修改 updateWorkflowDataFileInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("workflowDataFileV1ServiceDaoImpl.updateWorkflowDataFileInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * 查询OA附件数量 |
| | | * @param info OA附件信息 |
| | | * @return OA附件数量 |
| | | */ |
| | | @Override |
| | | public int queryWorkflowDataFilesCount(Map info) { |
| | | logger.debug("查询 queryWorkflowDataFilesCount 入参 info : {}",info); |
| | | |
| | | List<Map> businessWorkflowDataFileInfos = sqlSessionTemplate.selectList("workflowDataFileV1ServiceDaoImpl.queryWorkflowDataFilesCount", info); |
| | | if (businessWorkflowDataFileInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessWorkflowDataFileInfos.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.IWorkflowDataFileV1ServiceDao; |
| | | import com.java110.intf.oa.IWorkflowDataFileV1InnerServiceSMO; |
| | | import com.java110.dto.workflowDataFile.WorkflowDataFileDto; |
| | | import com.java110.po.workflowDataFile.WorkflowDataFilePo; |
| | | 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 2021-12-02 16:25:47 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 WorkflowDataFileV1InnerServiceSMOImpl extends BaseServiceSMO implements IWorkflowDataFileV1InnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IWorkflowDataFileV1ServiceDao workflowDataFileV1ServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveWorkflowDataFile(@RequestBody WorkflowDataFilePo workflowDataFilePo) { |
| | | int saveFlag = workflowDataFileV1ServiceDaoImpl.saveWorkflowDataFileInfo(BeanConvertUtil.beanCovertMap(workflowDataFilePo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateWorkflowDataFile(@RequestBody WorkflowDataFilePo workflowDataFilePo) { |
| | | int saveFlag = workflowDataFileV1ServiceDaoImpl.updateWorkflowDataFileInfo(BeanConvertUtil.beanCovertMap(workflowDataFilePo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteWorkflowDataFile(@RequestBody WorkflowDataFilePo workflowDataFilePo) { |
| | | workflowDataFilePo.setStatusCd("1"); |
| | | int saveFlag = workflowDataFileV1ServiceDaoImpl.updateWorkflowDataFileInfo(BeanConvertUtil.beanCovertMap(workflowDataFilePo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<WorkflowDataFileDto> queryWorkflowDataFiles(@RequestBody WorkflowDataFileDto workflowDataFileDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = workflowDataFileDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | workflowDataFileDto.setPage((page - 1) * workflowDataFileDto.getRow()); |
| | | } |
| | | |
| | | List<WorkflowDataFileDto> workflowDataFiles = BeanConvertUtil.covertBeanList(workflowDataFileV1ServiceDaoImpl.getWorkflowDataFileInfo(BeanConvertUtil.beanCovertMap(workflowDataFileDto)), WorkflowDataFileDto.class); |
| | | |
| | | return workflowDataFiles; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryWorkflowDataFilesCount(@RequestBody WorkflowDataFileDto workflowDataFileDto) { |
| | | return workflowDataFileV1ServiceDaoImpl.queryWorkflowDataFilesCount(BeanConvertUtil.beanCovertMap(workflowDataFileDto)); } |
| | | |
| | | } |