| New file |
| | |
| | | package com.java110.dto.dictSpec; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | 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 DictSpecDto extends PageDto implements Serializable { |
| | | |
| | | private String specId; |
| | | private String tableColumns; |
| | | private String specName; |
| | | private String tableName; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getSpecId() { |
| | | return specId; |
| | | } |
| | | public void setSpecId(String specId) { |
| | | this.specId = specId; |
| | | } |
| | | public String getTableColumns() { |
| | | return tableColumns; |
| | | } |
| | | public void setTableColumns(String tableColumns) { |
| | | this.tableColumns = tableColumns; |
| | | } |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | public String getTableName() { |
| | | return tableName; |
| | | } |
| | | public void setTableName(String tableName) { |
| | | this.tableName = tableName; |
| | | } |
| | | |
| | | |
| | | 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.dictSpec; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体 |
| | | * add by 吴学文 at 2022-07-07 09:00:30 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 DictSpecPo implements Serializable { |
| | | |
| | | private String specId; |
| | | private String tableColumns; |
| | | private String specName; |
| | | private String statusCd = "0"; |
| | | private String tableName; |
| | | public String getSpecId() { |
| | | return specId; |
| | | } |
| | | public void setSpecId(String specId) { |
| | | this.specId = specId; |
| | | } |
| | | public String getTableColumns() { |
| | | return tableColumns; |
| | | } |
| | | public void setTableColumns(String tableColumns) { |
| | | this.tableColumns = tableColumns; |
| | | } |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getTableName() { |
| | | return tableName; |
| | | } |
| | | public void setTableName(String tableName) { |
| | | this.tableName = tableName; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private String rsId; |
| | | private String originalStock; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | public String getApplyOrderId() { |
| | | return applyOrderId; |
| | | } |
| | |
| | | public void setOriginalStock(String originalStock) { |
| | | this.originalStock = originalStock; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| 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="dictSpecV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存物品类型信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveDictSpecInfo" parameterType="Map"> |
| | | insert into t_dict_spec( |
| | | spec_id,table_columns,spec_name,table_name |
| | | ) values ( |
| | | #{specId},#{tableColumns},#{specName},#{tableName} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询物品类型信息 add by wuxw 2018-07-03 --> |
| | | <select id="getDictSpecInfo" parameterType="Map" resultType="Map"> |
| | | select t.spec_id,t.spec_id specId,t.table_columns,t.table_columns tableColumns,t.spec_name,t.spec_name |
| | | specName,t.status_cd,t.status_cd statusCd,t.table_name,t.table_name tableName |
| | | from t_dict_spec t |
| | | where 1 =1 |
| | | <if test="specId !=null and specId != ''"> |
| | | and t.spec_id= #{specId} |
| | | </if> |
| | | <if test="tableColumns !=null and tableColumns != ''"> |
| | | and t.table_columns= #{tableColumns} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="tableName !=null and tableName != ''"> |
| | | and t.table_name= #{tableName} |
| | | </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="updateDictSpecInfo" parameterType="Map"> |
| | | update t_dict_spec t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="tableColumns !=null and tableColumns != ''"> |
| | | , t.table_columns= #{tableColumns} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | , t.spec_name= #{specName} |
| | | </if> |
| | | <if test="tableName !=null and tableName != ''"> |
| | | , t.table_name= #{tableName} |
| | | </if> |
| | | where 1=1 |
| | | <if test="specId !=null and specId != ''"> |
| | | and t.spec_id= #{specId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询物品类型数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryDictSpecsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from t_dict_spec t |
| | | where 1 =1 |
| | | <if test="specId !=null and specId != ''"> |
| | | and t.spec_id= #{specId} |
| | | </if> |
| | | <if test="tableColumns !=null and tableColumns != ''"> |
| | | and t.table_columns= #{tableColumns} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="tableName !=null and tableName != ''"> |
| | | and t.table_name= #{tableName} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| 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="purchaseApplyDetailV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存采购申请明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePurchaseApplyDetailInfo" parameterType="Map"> |
| | | insert into purchase_apply_detail( |
| | | original_stock,quantity,operate,price,purchase_remark,purchase_quantity,rs_id,apply_order_id,remark,id,res_id |
| | | ) values ( |
| | | #{originalStock},#{quantity},#{operate},#{price},#{purchaseRemark},#{purchaseQuantity},#{rsId},#{applyOrderId},#{remark},#{id},#{resId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询采购申请明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getPurchaseApplyDetailInfo" parameterType="Map" resultType="Map"> |
| | | select t.original_stock,t.original_stock originalStock,t.quantity,t.price,t.purchase_remark,t.purchase_remark |
| | | purchaseRemark,t.purchase_quantity,t.purchase_quantity purchaseQuantity,t.rs_id,t.rs_id |
| | | rsId,t.apply_order_id,t.apply_order_id applyOrderId,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t.id,t.res_id,t.res_id resId |
| | | from purchase_apply_detail t |
| | | where 1 =1 |
| | | <if test="originalStock !=null and originalStock != ''"> |
| | | and t.original_stock= #{originalStock} |
| | | </if> |
| | | <if test="quantity !=null and quantity != ''"> |
| | | and t.quantity= #{quantity} |
| | | </if> |
| | | <if test="price !=null and price != ''"> |
| | | and t.price= #{price} |
| | | </if> |
| | | <if test="purchaseRemark !=null and purchaseRemark != ''"> |
| | | and t.purchase_remark= #{purchaseRemark} |
| | | </if> |
| | | <if test="purchaseQuantity !=null and purchaseQuantity != ''"> |
| | | and t.purchase_quantity= #{purchaseQuantity} |
| | | </if> |
| | | <if test="rsId !=null and rsId != ''"> |
| | | and t.rs_id= #{rsId} |
| | | </if> |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </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="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | </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="updatePurchaseApplyDetailInfo" parameterType="Map"> |
| | | update purchase_apply_detail t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="originalStock !=null and originalStock != ''"> |
| | | , t.original_stock= #{originalStock} |
| | | </if> |
| | | <if test="quantity !=null and quantity != ''"> |
| | | , t.quantity= #{quantity} |
| | | </if> |
| | | <if test="price !=null and price != ''"> |
| | | , t.price= #{price} |
| | | </if> |
| | | <if test="purchaseRemark !=null and purchaseRemark != ''"> |
| | | , t.purchase_remark= #{purchaseRemark} |
| | | </if> |
| | | <if test="purchaseQuantity !=null and purchaseQuantity != ''"> |
| | | , t.purchase_quantity= #{purchaseQuantity} |
| | | </if> |
| | | <if test="rsId !=null and rsId != ''"> |
| | | , t.rs_id= #{rsId} |
| | | </if> |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | , t.apply_order_id= #{applyOrderId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | , t.res_id= #{resId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询采购申请明细数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryPurchaseApplyDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from purchase_apply_detail t |
| | | where 1 =1 |
| | | <if test="originalStock !=null and originalStock != ''"> |
| | | and t.original_stock= #{originalStock} |
| | | </if> |
| | | <if test="quantity !=null and quantity != ''"> |
| | | and t.quantity= #{quantity} |
| | | </if> |
| | | <if test="price !=null and price != ''"> |
| | | and t.price= #{price} |
| | | </if> |
| | | <if test="purchaseRemark !=null and purchaseRemark != ''"> |
| | | and t.purchase_remark= #{purchaseRemark} |
| | | </if> |
| | | <if test="purchaseQuantity !=null and purchaseQuantity != ''"> |
| | | and t.purchase_quantity= #{purchaseQuantity} |
| | | </if> |
| | | <if test="rsId !=null and rsId != ''"> |
| | | and t.rs_id= #{rsId} |
| | | </if> |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </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="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| 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.dev; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.dictSpec.DictSpecDto; |
| | | import com.java110.po.dictSpec.DictSpecPo; |
| | | 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 2022-07-07 09:00:30 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 = "dev-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/dictSpecV1Api") |
| | | public interface IDictSpecV1InnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveDictSpec", method = RequestMethod.POST) |
| | | public int saveDictSpec(@RequestBody DictSpecPo dictSpecPo); |
| | | |
| | | @RequestMapping(value = "/updateDictSpec", method = RequestMethod.POST) |
| | | public int updateDictSpec(@RequestBody DictSpecPo dictSpecPo); |
| | | |
| | | @RequestMapping(value = "/deleteDictSpec", method = RequestMethod.POST) |
| | | public int deleteDictSpec(@RequestBody DictSpecPo dictSpecPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param dictSpecDto 数据对象分享 |
| | | * @return DictSpecDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryDictSpecs", method = RequestMethod.POST) |
| | | List<DictSpecDto> queryDictSpecs(@RequestBody DictSpecDto dictSpecDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param dictSpecDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryDictSpecsCount", method = RequestMethod.POST) |
| | | int queryDictSpecsCount(@RequestBody DictSpecDto dictSpecDto); |
| | | } |
| 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.store; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.purchaseApplyDetail.PurchaseApplyDetailDto; |
| | | import com.java110.po.purchase.PurchaseApplyDetailPo; |
| | | 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 2022-07-07 09:54:38 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 = "store-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/purchaseApplyDetailV1Api") |
| | | public interface IPurchaseApplyDetailV1InnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/savePurchaseApplyDetail", method = RequestMethod.POST) |
| | | public int savePurchaseApplyDetail(@RequestBody PurchaseApplyDetailPo purchaseApplyDetailPo); |
| | | |
| | | @RequestMapping(value = "/updatePurchaseApplyDetail", method = RequestMethod.POST) |
| | | public int updatePurchaseApplyDetail(@RequestBody PurchaseApplyDetailPo purchaseApplyDetailPo); |
| | | |
| | | @RequestMapping(value = "/deletePurchaseApplyDetail", method = RequestMethod.POST) |
| | | public int deletePurchaseApplyDetail(@RequestBody PurchaseApplyDetailPo purchaseApplyDetailPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param purchaseApplyDetailDto 数据对象分享 |
| | | * @return PurchaseApplyDetailDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryPurchaseApplyDetails", method = RequestMethod.POST) |
| | | List<PurchaseApplyDetailDto> queryPurchaseApplyDetails(@RequestBody PurchaseApplyDetailDto purchaseApplyDetailDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param purchaseApplyDetailDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryPurchaseApplyDetailsCount", method = RequestMethod.POST) |
| | | int queryPurchaseApplyDetailsCount(@RequestBody PurchaseApplyDetailDto purchaseApplyDetailDto); |
| | | } |
| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.dev.IDictV1InnerServiceSMO; |
| | | import com.java110.po.dict.DictPo; |
| | | 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.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * 类表述:保存 |
| | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd"); |
| | | Assert.hasKeyAndValue(reqJson, "name", "请求报文中未包含name"); |
| | | Assert.hasKeyAndValue(reqJson, "tableColumns", "请求报文中未包含tableColumns"); |
| | | Assert.hasKeyAndValue(reqJson, "tableName", "请求报文中未包含tableName"); |
| | | Assert.hasKeyAndValue(reqJson, "name", "请求报文中未包含name"); |
| | | Assert.hasKeyAndValue(reqJson, "tableColumns", "请求报文中未包含tableColumns"); |
| | | Assert.hasKeyAndValue(reqJson, "tableName", "请求报文中未包含tableName"); |
| | | |
| | | } |
| | | |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | DictPo dictPo = BeanConvertUtil.covertBean(reqJson, DictPo.class); |
| | | DictPo dictPo = BeanConvertUtil.covertBean(reqJson, DictPo.class); |
| | | int flag = dictV1InnerServiceSMOImpl.saveDict(dictPo); |
| | | |
| | | if (flag < 1) { |
| 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.dev.cmd.dictSpec; |
| | | |
| | | 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.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.dev.IDictSpecV1InnerServiceSMO; |
| | | import com.java110.po.dictSpec.DictSpecPo; |
| | | 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.springframework.beans.factory.annotation.Autowired; |
| | | import com.java110.dto.dictSpec.DictSpecDto; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:dictSpec.listDictSpec |
| | | * 请求路劲:/app/dictSpec.ListDictSpec |
| | | * add by 吴学文 at 2022-07-07 09:00:30 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 = "dictSpec.listDictSpec") |
| | | public class ListDictSpecCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListDictSpecCmd.class); |
| | | @Autowired |
| | | private IDictSpecV1InnerServiceSMO dictSpecV1InnerServiceSMOImpl; |
| | | |
| | | @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 { |
| | | |
| | | DictSpecDto dictSpecDto = BeanConvertUtil.covertBean(reqJson, DictSpecDto.class); |
| | | |
| | | int count = dictSpecV1InnerServiceSMOImpl.queryDictSpecsCount(dictSpecDto); |
| | | |
| | | List<DictSpecDto> dictSpecDtos = null; |
| | | |
| | | if (count > 0) { |
| | | dictSpecDtos = dictSpecV1InnerServiceSMOImpl.queryDictSpecs(dictSpecDto); |
| | | } else { |
| | | dictSpecDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, dictSpecDtos); |
| | | |
| | | 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.dev.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 2022-07-07 09:00:30 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 IDictSpecV1ServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 物品类型信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveDictSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询物品类型信息(instance过程) |
| | | * 根据bId 查询物品类型信息 |
| | | * @param info bId 信息 |
| | | * @return 物品类型信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getDictSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改物品类型信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int updateDictSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询物品类型总数 |
| | | * |
| | | * @param info 物品类型信息 |
| | | * @return 物品类型数量 |
| | | */ |
| | | int queryDictSpecsCount(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.dev.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.dev.dao.IDictSpecV1ServiceDao; |
| | | 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 2022-07-07 09:00:30 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("dictSpecV1ServiceDaoImpl") |
| | | public class DictSpecV1ServiceDaoImpl extends BaseServiceDao implements IDictSpecV1ServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(DictSpecV1ServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存物品类型信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int saveDictSpecInfo(Map info) throws DAOException { |
| | | logger.debug("保存 saveDictSpecInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("dictSpecV1ServiceDaoImpl.saveDictSpecInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询物品类型信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getDictSpecInfo(Map info) throws DAOException { |
| | | logger.debug("查询 getDictSpecInfo 入参 info : {}",info); |
| | | |
| | | List<Map> businessDictSpecInfos = sqlSessionTemplate.selectList("dictSpecV1ServiceDaoImpl.getDictSpecInfo",info); |
| | | |
| | | return businessDictSpecInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改物品类型信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int updateDictSpecInfo(Map info) throws DAOException { |
| | | logger.debug("修改 updateDictSpecInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("dictSpecV1ServiceDaoImpl.updateDictSpecInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * 查询物品类型数量 |
| | | * @param info 物品类型信息 |
| | | * @return 物品类型数量 |
| | | */ |
| | | @Override |
| | | public int queryDictSpecsCount(Map info) { |
| | | logger.debug("查询 queryDictSpecsCount 入参 info : {}",info); |
| | | |
| | | List<Map> businessDictSpecInfos = sqlSessionTemplate.selectList("dictSpecV1ServiceDaoImpl.queryDictSpecsCount", info); |
| | | if (businessDictSpecInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessDictSpecInfos.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.dev.smo.impl; |
| | | |
| | | |
| | | import com.java110.dev.dao.IDictSpecV1ServiceDao; |
| | | import com.java110.intf.dev.IDictSpecV1InnerServiceSMO; |
| | | import com.java110.dto.dictSpec.DictSpecDto; |
| | | import com.java110.po.dictSpec.DictSpecPo; |
| | | 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 2022-07-07 09:00:30 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 DictSpecV1InnerServiceSMOImpl extends BaseServiceSMO implements IDictSpecV1InnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IDictSpecV1ServiceDao dictSpecV1ServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveDictSpec(@RequestBody DictSpecPo dictSpecPo) { |
| | | int saveFlag = dictSpecV1ServiceDaoImpl.saveDictSpecInfo(BeanConvertUtil.beanCovertMap(dictSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateDictSpec(@RequestBody DictSpecPo dictSpecPo) { |
| | | int saveFlag = dictSpecV1ServiceDaoImpl.updateDictSpecInfo(BeanConvertUtil.beanCovertMap(dictSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteDictSpec(@RequestBody DictSpecPo dictSpecPo) { |
| | | dictSpecPo.setStatusCd("1"); |
| | | int saveFlag = dictSpecV1ServiceDaoImpl.updateDictSpecInfo(BeanConvertUtil.beanCovertMap(dictSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<DictSpecDto> queryDictSpecs(@RequestBody DictSpecDto dictSpecDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = dictSpecDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | dictSpecDto.setPage((page - 1) * dictSpecDto.getRow()); |
| | | } |
| | | |
| | | List<DictSpecDto> dictSpecs = BeanConvertUtil.covertBeanList(dictSpecV1ServiceDaoImpl.getDictSpecInfo(BeanConvertUtil.beanCovertMap(dictSpecDto)), DictSpecDto.class); |
| | | |
| | | return dictSpecs; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryDictSpecsCount(@RequestBody DictSpecDto dictSpecDto) { |
| | | return dictSpecV1ServiceDaoImpl.queryDictSpecsCount(BeanConvertUtil.beanCovertMap(dictSpecDto)); } |
| | | |
| | | } |
| 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.store.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 2022-07-07 09:54:38 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 IPurchaseApplyDetailV1ServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 采购申请明细信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int savePurchaseApplyDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询采购申请明细信息(instance过程) |
| | | * 根据bId 查询采购申请明细信息 |
| | | * @param info bId 信息 |
| | | * @return 采购申请明细信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getPurchaseApplyDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改采购申请明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int updatePurchaseApplyDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询采购申请明细总数 |
| | | * |
| | | * @param info 采购申请明细信息 |
| | | * @return 采购申请明细数量 |
| | | */ |
| | | int queryPurchaseApplyDetailsCount(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.store.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.store.dao.IPurchaseApplyDetailV1ServiceDao; |
| | | 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 2022-07-07 09:54:38 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("purchaseApplyDetailV1ServiceDaoImpl") |
| | | public class PurchaseApplyDetailV1ServiceDaoImpl extends BaseServiceDao implements IPurchaseApplyDetailV1ServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(PurchaseApplyDetailV1ServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存采购申请明细信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int savePurchaseApplyDetailInfo(Map info) throws DAOException { |
| | | logger.debug("保存 savePurchaseApplyDetailInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("purchaseApplyDetailV1ServiceDaoImpl.savePurchaseApplyDetailInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询采购申请明细信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getPurchaseApplyDetailInfo(Map info) throws DAOException { |
| | | logger.debug("查询 getPurchaseApplyDetailInfo 入参 info : {}",info); |
| | | |
| | | List<Map> businessPurchaseApplyDetailInfos = sqlSessionTemplate.selectList("purchaseApplyDetailV1ServiceDaoImpl.getPurchaseApplyDetailInfo",info); |
| | | |
| | | return businessPurchaseApplyDetailInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改采购申请明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int updatePurchaseApplyDetailInfo(Map info) throws DAOException { |
| | | logger.debug("修改 updatePurchaseApplyDetailInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("purchaseApplyDetailV1ServiceDaoImpl.updatePurchaseApplyDetailInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * 查询采购申请明细数量 |
| | | * @param info 采购申请明细信息 |
| | | * @return 采购申请明细数量 |
| | | */ |
| | | @Override |
| | | public int queryPurchaseApplyDetailsCount(Map info) { |
| | | logger.debug("查询 queryPurchaseApplyDetailsCount 入参 info : {}",info); |
| | | |
| | | List<Map> businessPurchaseApplyDetailInfos = sqlSessionTemplate.selectList("purchaseApplyDetailV1ServiceDaoImpl.queryPurchaseApplyDetailsCount", info); |
| | | if (businessPurchaseApplyDetailInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessPurchaseApplyDetailInfos.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.store.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.purchaseApplyDetail.PurchaseApplyDetailDto; |
| | | import com.java110.intf.store.IPurchaseApplyDetailV1InnerServiceSMO; |
| | | import com.java110.po.purchase.PurchaseApplyDetailPo; |
| | | import com.java110.store.dao.IPurchaseApplyDetailV1ServiceDao; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用 |
| | | * add by 吴学文 at 2022-07-07 09:54:38 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 PurchaseApplyDetailV1InnerServiceSMOImpl extends BaseServiceSMO implements IPurchaseApplyDetailV1InnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IPurchaseApplyDetailV1ServiceDao purchaseApplyDetailV1ServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int savePurchaseApplyDetail(@RequestBody PurchaseApplyDetailPo purchaseApplyDetailPo) { |
| | | int saveFlag = purchaseApplyDetailV1ServiceDaoImpl.savePurchaseApplyDetailInfo(BeanConvertUtil.beanCovertMap(purchaseApplyDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updatePurchaseApplyDetail(@RequestBody PurchaseApplyDetailPo purchaseApplyDetailPo) { |
| | | int saveFlag = purchaseApplyDetailV1ServiceDaoImpl.updatePurchaseApplyDetailInfo(BeanConvertUtil.beanCovertMap(purchaseApplyDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deletePurchaseApplyDetail(@RequestBody PurchaseApplyDetailPo purchaseApplyDetailPo) { |
| | | purchaseApplyDetailPo.setStatusCd("1"); |
| | | int saveFlag = purchaseApplyDetailV1ServiceDaoImpl.updatePurchaseApplyDetailInfo(BeanConvertUtil.beanCovertMap(purchaseApplyDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<PurchaseApplyDetailDto> queryPurchaseApplyDetails(@RequestBody PurchaseApplyDetailDto purchaseApplyDetailDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = purchaseApplyDetailDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | purchaseApplyDetailDto.setPage((page - 1) * purchaseApplyDetailDto.getRow()); |
| | | } |
| | | |
| | | List<PurchaseApplyDetailDto> purchaseApplyDetails = BeanConvertUtil.covertBeanList(purchaseApplyDetailV1ServiceDaoImpl.getPurchaseApplyDetailInfo(BeanConvertUtil.beanCovertMap(purchaseApplyDetailDto)), PurchaseApplyDetailDto.class); |
| | | |
| | | return purchaseApplyDetails; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryPurchaseApplyDetailsCount(@RequestBody PurchaseApplyDetailDto purchaseApplyDetailDto) { |
| | | return purchaseApplyDetailV1ServiceDaoImpl.queryPurchaseApplyDetailsCount(BeanConvertUtil.beanCovertMap(purchaseApplyDetailDto)); |
| | | } |
| | | |
| | | } |