zhouxiang
2021-12-10 c559c5bd9b205e5f37442076ae898aea9530c2f5
Merge branch 'master' of http://1.15.4.62/r/~chenjiahe/phi_platform into zhouxiangTest
4 文件已重命名
22个文件已添加
2个文件已修改
1785 ■■■■■ 已修改文件
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionDrugsMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionJoinMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionProjectMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionSingleMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/ShopWarehouseMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/DeductionDrugsMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/DeductionJoinMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/DeductionProjectMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/DeductionSingleMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/ShopWarehouseMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/AutoDomeUtil.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/controller/DeductionController.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionDrugsService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionJoinService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionProjectService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionSingleService.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionDrugsServiceImpl.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionJoinServiceImpl.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionProjectServiceImpl.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionSingleServiceImpl.java 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/dto/DeductionDto.java 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/order/service/impl/OrderServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/user/service/UserProjectItemService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/user/service/UserProjectService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/user/service/impl/UserProjectItemServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/user/service/impl/UserProjectServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/warehouse/service/ShopWarehouseService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/warehouse/service/impl/ShopWarehouseServiceImpl.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionDrugsMapper.java
New file
@@ -0,0 +1,35 @@
package com.hx.phip.dao.mapper;
import java.util.List;
import java.util.Map;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.model.deduction.DeductionDrugs;
public interface DeductionDrugsMapper {
    /**新增,返回主键*/
    int insert(DeductionDrugs deductionDrugs);
    /**查询条数*/
    int selectCount(SqlSentence sqlSentence);
    /**查询条数*/
    int selectCountSql(SqlSentence sqlSentence);
    /**查询列表,返回实体类的List*/
    List<DeductionDrugs> selectList(SqlSentence sqlSentence);
    /**查询列表,返回Map的List*/
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    /**查询,返回单个实体*/
    DeductionDrugs selectOne(SqlSentence sqlSentence);
    /**查询,返回单个map*/
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    /**查询,返回实体类没有大数据的*/
    DeductionDrugs selectOneByKey(Object object);
    /**查询,返回实体类有大数据的*/
    DeductionDrugs selectOneByKeyBlob(Object object);
    /**更新,返回更新数量*/
    int updateWhere(SqlSentence sqlSentence);
    /**更新,返回更新数量*/
    int updateAll(DeductionDrugs deductionDrugs);
    /**删除,返回删除数量*/
    int deleteWhere(SqlSentence sqlSentence);
    /**删除,返回删除数量*/
    int deleteById(Object object);
}
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionJoinMapper.java
New file
@@ -0,0 +1,35 @@
package com.hx.phip.dao.mapper;
import java.util.List;
import java.util.Map;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.model.deduction.DeductionJoin;
public interface DeductionJoinMapper {
    /**新增,返回主键*/
    int insert(DeductionJoin deductionJoin);
    /**查询条数*/
    int selectCount(SqlSentence sqlSentence);
    /**查询条数*/
    int selectCountSql(SqlSentence sqlSentence);
    /**查询列表,返回实体类的List*/
    List<DeductionJoin> selectList(SqlSentence sqlSentence);
    /**查询列表,返回Map的List*/
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    /**查询,返回单个实体*/
    DeductionJoin selectOne(SqlSentence sqlSentence);
    /**查询,返回单个map*/
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    /**查询,返回实体类没有大数据的*/
    DeductionJoin selectOneByKey(Object object);
    /**查询,返回实体类有大数据的*/
    DeductionJoin selectOneByKeyBlob(Object object);
    /**更新,返回更新数量*/
    int updateWhere(SqlSentence sqlSentence);
    /**更新,返回更新数量*/
    int updateAll(DeductionJoin deductionJoin);
    /**删除,返回删除数量*/
    int deleteWhere(SqlSentence sqlSentence);
    /**删除,返回删除数量*/
    int deleteById(Object object);
}
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionProjectMapper.java
New file
@@ -0,0 +1,35 @@
package com.hx.phip.dao.mapper;
import java.util.List;
import java.util.Map;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.model.deduction.DeductionProject;
public interface DeductionProjectMapper {
    /**新增,返回主键*/
    int insert(DeductionProject deductionProject);
    /**查询条数*/
    int selectCount(SqlSentence sqlSentence);
    /**查询条数*/
    int selectCountSql(SqlSentence sqlSentence);
    /**查询列表,返回实体类的List*/
    List<DeductionProject> selectList(SqlSentence sqlSentence);
    /**查询列表,返回Map的List*/
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    /**查询,返回单个实体*/
    DeductionProject selectOne(SqlSentence sqlSentence);
    /**查询,返回单个map*/
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    /**查询,返回实体类没有大数据的*/
    DeductionProject selectOneByKey(Object object);
    /**查询,返回实体类有大数据的*/
    DeductionProject selectOneByKeyBlob(Object object);
    /**更新,返回更新数量*/
    int updateWhere(SqlSentence sqlSentence);
    /**更新,返回更新数量*/
    int updateAll(DeductionProject deductionProject);
    /**删除,返回删除数量*/
    int deleteWhere(SqlSentence sqlSentence);
    /**删除,返回删除数量*/
    int deleteById(Object object);
}
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/DeductionSingleMapper.java
New file
@@ -0,0 +1,35 @@
package com.hx.phip.dao.mapper;
import java.util.List;
import java.util.Map;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.model.deduction.DeductionSingle;
public interface DeductionSingleMapper {
    /**新增,返回主键*/
    int insert(DeductionSingle deductionSingle);
    /**查询条数*/
    int selectCount(SqlSentence sqlSentence);
    /**查询条数*/
    int selectCountSql(SqlSentence sqlSentence);
    /**查询列表,返回实体类的List*/
    List<DeductionSingle> selectList(SqlSentence sqlSentence);
    /**查询列表,返回Map的List*/
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    /**查询,返回单个实体*/
    DeductionSingle selectOne(SqlSentence sqlSentence);
    /**查询,返回单个map*/
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    /**查询,返回实体类没有大数据的*/
    DeductionSingle selectOneByKey(Object object);
    /**查询,返回实体类有大数据的*/
    DeductionSingle selectOneByKeyBlob(Object object);
    /**更新,返回更新数量*/
    int updateWhere(SqlSentence sqlSentence);
    /**更新,返回更新数量*/
    int updateAll(DeductionSingle deductionSingle);
    /**删除,返回删除数量*/
    int deleteWhere(SqlSentence sqlSentence);
    /**删除,返回删除数量*/
    int deleteById(Object object);
}
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/ShopWarehouseMapper.java
New file
@@ -0,0 +1,35 @@
package com.hx.phip.dao.mapper;
import java.util.List;
import java.util.Map;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.model.warehouse.ShopWarehouse;
public interface ShopWarehouseMapper {
    /**新增,返回主键*/
    int insert(ShopWarehouse shopWarehouse);
    /**查询条数*/
    int selectCount(SqlSentence sqlSentence);
    /**查询条数*/
    int selectCountSql(SqlSentence sqlSentence);
    /**查询列表,返回实体类的List*/
    List<ShopWarehouse> selectList(SqlSentence sqlSentence);
    /**查询列表,返回Map的List*/
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    /**查询,返回单个实体*/
    ShopWarehouse selectOne(SqlSentence sqlSentence);
    /**查询,返回单个map*/
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    /**查询,返回实体类没有大数据的*/
    ShopWarehouse selectOneByKey(Object object);
    /**查询,返回实体类有大数据的*/
    ShopWarehouse selectOneByKeyBlob(Object object);
    /**更新,返回更新数量*/
    int updateWhere(SqlSentence sqlSentence);
    /**更新,返回更新数量*/
    int updateAll(ShopWarehouse shopWarehouse);
    /**删除,返回删除数量*/
    int deleteWhere(SqlSentence sqlSentence);
    /**删除,返回删除数量*/
    int deleteById(Object object);
}
phi_platform_common/src/main/resources/mapper/DeductionDrugsMapper.xml
New file
@@ -0,0 +1,86 @@
<?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">
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
<mapper namespace="com.hx.phip.dao.mapper.DeductionDrugsMapper">
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,drugsNo = #{drugsNo},drugsName = #{drugsName},specs = #{specs},num = #{num},unitName = #{unitName},price = #{price},warehouseId = #{warehouseId},batchNo = #{batchNo},consumablesId = #{consumablesId},deductionProjectId = #{deductionProjectId},deductionSingleId = #{deductionSingleId},isDel = #{isDel},createTime = #{createTime}
        </trim>
    </sql>
    <!--  后续通过  namespace.id-->
    <!--parameterType:输入参数的类型
    resultType:查询返回结果值的类型  ,返回类型  -->
    <insert id="insert" parameterType="com.hx.phiappt.model.deduction.DeductionDrugs">
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into deduction_drugs (id,drugsNo,drugsName,specs,num,unitName,price,warehouseId,batchNo,consumablesId,deductionProjectId,deductionSingleId,isDel,createTime)  values (#{id},#{drugsNo},#{drugsName},#{specs},#{num},#{unitName},#{price},#{warehouseId},#{batchNo},#{consumablesId},#{deductionProjectId},#{deductionSingleId},#{isDel},#{createTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.deduction.DeductionDrugs" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectOne" resultType="com.hx.phiappt.model.deduction.DeductionDrugs" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            select
                COUNT(*)
            from deduction_drugs
                WHERE ${sqlSentence}
    </select>
    <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
     </select>
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.deduction.DeductionDrugs" parameterType="java.lang.Object" >
        select
            id,drugsNo,drugsName,specs,num,unitName,price,warehouseId,batchNo,consumablesId,deductionProjectId,deductionSingleId,isDel,createTime
        from deduction_drugs
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.deduction.DeductionDrugs" parameterType="java.lang.Object" >
        select
            id,drugsNo,drugsName,specs,num,unitName,price,warehouseId,batchNo,consumablesId,deductionProjectId,deductionSingleId,isDel,createTime
        from deduction_drugs
        WHERE id = #{value}
    </select>
    <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
        update
            deduction_drugs
        SET ${sqlSentence}
    </update>
    <update id="updateAll" parameterType="com.hx.phiappt.model.deduction.DeductionDrugs">
        update deduction_drugs
            SET <include refid="Update_Column_All"/>
        WHERE id = #{id}
    </update>
    <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
        delete from deduction_drugs WHERE ${sqlSentence}
    </delete>
    <delete id="deleteById"  parameterType="java.lang.Object">
        delete from deduction_drugs WHERE id = #{value}
    </delete>
</mapper>
phi_platform_common/src/main/resources/mapper/DeductionJoinMapper.xml
New file
@@ -0,0 +1,86 @@
<?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">
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
<mapper namespace="com.hx.phip.dao.mapper.DeductionJoinMapper">
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,roleId = #{roleId},roleName = #{roleName},employeeId = #{employeeId},employeeName = #{employeeName},useDuration = #{useDuration},deductionProjectId = #{deductionProjectId},deductionSingleId = #{deductionSingleId},isDel = #{isDel},createTime = #{createTime}
        </trim>
    </sql>
    <!--  后续通过  namespace.id-->
    <!--parameterType:输入参数的类型
    resultType:查询返回结果值的类型  ,返回类型  -->
    <insert id="insert" parameterType="com.hx.phiappt.model.deduction.DeductionJoin">
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into deduction_join (id,roleId,roleName,employeeId,employeeName,useDuration,deductionProjectId,deductionSingleId,isDel,createTime)  values (#{id},#{roleId},#{roleName},#{employeeId},#{employeeName},#{useDuration},#{deductionProjectId},#{deductionSingleId},#{isDel},#{createTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectOne" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            select
                COUNT(*)
            from deduction_join
                WHERE ${sqlSentence}
    </select>
    <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
     </select>
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="java.lang.Object" >
        select
            id,roleId,roleName,employeeId,employeeName,useDuration,deductionProjectId,deductionSingleId,isDel,createTime
        from deduction_join
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="java.lang.Object" >
        select
            id,roleId,roleName,employeeId,employeeName,useDuration,deductionProjectId,deductionSingleId,isDel,createTime
        from deduction_join
        WHERE id = #{value}
    </select>
    <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
        update
            deduction_join
        SET ${sqlSentence}
    </update>
    <update id="updateAll" parameterType="com.hx.phiappt.model.deduction.DeductionJoin">
        update deduction_join
            SET <include refid="Update_Column_All"/>
        WHERE id = #{id}
    </update>
    <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
        delete from deduction_join WHERE ${sqlSentence}
    </delete>
    <delete id="deleteById"  parameterType="java.lang.Object">
        delete from deduction_join WHERE id = #{value}
    </delete>
</mapper>
phi_platform_common/src/main/resources/mapper/DeductionProjectMapper.xml
New file
@@ -0,0 +1,86 @@
<?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">
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
<mapper namespace="com.hx.phip.dao.mapper.DeductionProjectMapper">
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,projectNo = #{projectNo},projectName = #{projectName},price = #{price},num = #{num},familiesRoomName = #{familiesRoomName},specification = #{specification},useDuration = #{useDuration},palsyDuration = #{palsyDuration},projectId = #{projectId},deductionSingleId = #{deductionSingleId},executeStartTime = #{executeStartTime},executeEndTime = #{executeEndTime},remarkInfo = #{remarkInfo},isDel = #{isDel},createTime = #{createTime}
        </trim>
    </sql>
    <!--  后续通过  namespace.id-->
    <!--parameterType:输入参数的类型
    resultType:查询返回结果值的类型  ,返回类型  -->
    <insert id="insert" parameterType="com.hx.phiappt.model.deduction.DeductionProject">
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into deduction_project (id,projectNo,projectName,price,num,familiesRoomName,specification,useDuration,palsyDuration,projectId,deductionSingleId,executeStartTime,executeEndTime,remarkInfo,isDel,createTime)  values (#{id},#{projectNo},#{projectName},#{price},#{num},#{familiesRoomName},#{specification},#{useDuration},#{palsyDuration},#{projectId},#{deductionSingleId},#{executeStartTime},#{executeEndTime},#{remarkInfo},#{isDel},#{createTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.deduction.DeductionProject" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectOne" resultType="com.hx.phiappt.model.deduction.DeductionProject" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            select
                COUNT(*)
            from deduction_project
                WHERE ${sqlSentence}
    </select>
    <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
     </select>
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.deduction.DeductionProject" parameterType="java.lang.Object" >
        select
            id,projectNo,projectName,price,num,familiesRoomName,specification,useDuration,palsyDuration,projectId,deductionSingleId,executeStartTime,executeEndTime,remarkInfo,isDel,createTime
        from deduction_project
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.deduction.DeductionProject" parameterType="java.lang.Object" >
        select
            id,projectNo,projectName,price,num,familiesRoomName,specification,useDuration,palsyDuration,projectId,deductionSingleId,executeStartTime,executeEndTime,remarkInfo,isDel,createTime
        from deduction_project
        WHERE id = #{value}
    </select>
    <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
        update
            deduction_project
        SET ${sqlSentence}
    </update>
    <update id="updateAll" parameterType="com.hx.phiappt.model.deduction.DeductionProject">
        update deduction_project
            SET <include refid="Update_Column_All"/>
        WHERE id = #{id}
    </update>
    <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
        delete from deduction_project WHERE ${sqlSentence}
    </delete>
    <delete id="deleteById"  parameterType="java.lang.Object">
        delete from deduction_project WHERE id = #{value}
    </delete>
</mapper>
phi_platform_common/src/main/resources/mapper/DeductionSingleMapper.xml
New file
@@ -0,0 +1,86 @@
<?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">
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
<mapper namespace="com.hx.phip.dao.mapper.DeductionSingleMapper">
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,userId = #{userId},type = #{type},commonId = #{commonId},sourceCode = #{sourceCode},sourceName = #{sourceName},status = #{status},rescindedTime = #{rescindedTime},cancelTime = #{cancelTime},remarkInfo = #{remarkInfo},isDel = #{isDel},createTime = #{createTime}
        </trim>
    </sql>
    <!--  后续通过  namespace.id-->
    <!--parameterType:输入参数的类型
    resultType:查询返回结果值的类型  ,返回类型  -->
    <insert id="insert" parameterType="com.hx.phiappt.model.deduction.DeductionSingle">
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into deduction_single (id,userId,type,commonId,sourceCode,sourceName,status,rescindedTime,cancelTime,remarkInfo,isDel,createTime)  values (#{id},#{userId},#{type},#{commonId},#{sourceCode},#{sourceName},#{status},#{rescindedTime},#{cancelTime},#{remarkInfo},#{isDel},#{createTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.deduction.DeductionSingle" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectOne" resultType="com.hx.phiappt.model.deduction.DeductionSingle" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            select
                COUNT(*)
            from deduction_single
                WHERE ${sqlSentence}
    </select>
    <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
     </select>
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.deduction.DeductionSingle" parameterType="java.lang.Object" >
        select
            id,userId,type,commonId,sourceCode,sourceName,status,rescindedTime,cancelTime,remarkInfo,isDel,createTime
        from deduction_single
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.deduction.DeductionSingle" parameterType="java.lang.Object" >
        select
            id,userId,type,commonId,sourceCode,sourceName,status,rescindedTime,cancelTime,remarkInfo,isDel,createTime
        from deduction_single
        WHERE id = #{value}
    </select>
    <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
        update
            deduction_single
        SET ${sqlSentence}
    </update>
    <update id="updateAll" parameterType="com.hx.phiappt.model.deduction.DeductionSingle">
        update deduction_single
            SET <include refid="Update_Column_All"/>
        WHERE id = #{id}
    </update>
    <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
        delete from deduction_single WHERE ${sqlSentence}
    </delete>
    <delete id="deleteById"  parameterType="java.lang.Object">
        delete from deduction_single WHERE id = #{value}
    </delete>
</mapper>
phi_platform_common/src/main/resources/mapper/ShopWarehouseMapper.xml
New file
@@ -0,0 +1,86 @@
<?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">
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
<mapper namespace="com.hx.phip.dao.mapper.ShopWarehouseMapper">
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,type = #{type},name = #{name},isUp = #{isUp},isKukura = #{isKukura},isAdmin = #{isAdmin},shopId = #{shopId},isDel = #{isDel},createTime = #{createTime}
        </trim>
    </sql>
    <!--  后续通过  namespace.id-->
    <!--parameterType:输入参数的类型
    resultType:查询返回结果值的类型  ,返回类型  -->
    <insert id="insert" parameterType="com.hx.phiappt.model.warehouse.ShopWarehouse">
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into shop_warehouse (id,type,name,isUp,isKukura,isAdmin,shopId,isDel,createTime)  values (#{id},#{type},#{name},#{isUp},#{isKukura},#{isAdmin},#{shopId},#{isDel},#{createTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.warehouse.ShopWarehouse" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectOne" resultType="com.hx.phiappt.model.warehouse.ShopWarehouse" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            select
                COUNT(*)
            from shop_warehouse
                WHERE ${sqlSentence}
    </select>
    <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
     </select>
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.warehouse.ShopWarehouse" parameterType="java.lang.Object" >
        select
            id,type,name,isUp,isKukura,isAdmin,shopId,isDel,createTime
        from shop_warehouse
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.warehouse.ShopWarehouse" parameterType="java.lang.Object" >
        select
            id,type,name,isUp,isKukura,isAdmin,shopId,isDel,createTime
        from shop_warehouse
        WHERE id = #{value}
    </select>
    <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
        update
            shop_warehouse
        SET ${sqlSentence}
    </update>
    <update id="updateAll" parameterType="com.hx.phiappt.model.warehouse.ShopWarehouse">
        update shop_warehouse
            SET <include refid="Update_Column_All"/>
        WHERE id = #{id}
    </update>
    <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
        delete from shop_warehouse WHERE ${sqlSentence}
    </delete>
    <delete id="deleteById"  parameterType="java.lang.Object">
        delete from shop_warehouse WHERE id = #{value}
    </delete>
</mapper>
phi_platform_user/src/main/java/com/hx/phip/AutoDomeUtil.java
@@ -3,8 +3,12 @@
import com.hx.auto.GeneratorUtil;
import com.hx.auto.common.UrlData;
import com.hx.phiappt.model.*;
import com.hx.phip.model.ApplyParameter;
import com.hx.phip.model.SysParameter;
import com.hx.phiappt.model.deduction.*;
import com.hx.phiappt.model.user.*;
import com.hx.phiappt.model.warehouse.*;
import com.hx.util.StringUtils;
import java.io.File;
/**
 * 自动生成工具
@@ -25,18 +29,46 @@
        String controllerPackRoot = "phi_platform_user.src.main.java";
        String controllerPackRootResourse = "phi_platform_user.src.main.resources";
        // 替换此处名字
        Class<?> clas = DeductionSign.class;
        // 获取对象生成的上层包名
        String objectPackageName = clas.getPackage().getName();
        String fileName = null;
        if(!StringUtils.isEmpty(objectPackageName)){
            // 获取上层包名
            fileName = objectPackageName.substring(objectPackageName.lastIndexOf("."));
            if(fileName.contains("model")){
                // 上一层是model 恢复默认路径
                fileName = "";
            }
        }
        UrlData urlData = new UrlData();
        urlData.setTotalUrl(packageName);
        urlData.actionUrlData(controllerPackRoot,packageName + ".controller");
        urlData.daoUrlData(commonPackRoot,packageName + ".dao.mapper");
        urlData.serviceUrlData(controllerPackRoot,packageName + ".service");
        urlData.serviceImplUrlData(controllerPackRoot,packageName + ".service.impl");
        urlData.serviceUrlData(controllerPackRoot,packageName + fileName +".service");
        urlData.serviceImplUrlData(controllerPackRoot,packageName + fileName +".service.impl");
        urlData.mapperUrlData(commonPackRootResourse, "mapper");
        // 文件夹没有创建创建文件夹
        String targetFile = urlData.getServiceImplUrl()[1].replace(".", "/");
        // 文件夹路径
        targetFile = "./"+urlData.getServiceImplUrl()[0].replace(".", "/")+"/"+targetFile;
        File fileServiceImpl = new File(targetFile);
        // 判断文件夹是否存在
        if(!fileServiceImpl.exists()){
            // 文件夹创建
            boolean mkdirs = fileServiceImpl.mkdirs();
            if(mkdirs){
                System.out.println("文件夹创建成功:"+targetFile);
            }
        }
        //生成全部的xml和mapper
        //GeneratorUtil.generatorXmlAndMapper("com.hx.medical.model",urlData);
        Class<?> clas = EmployeeBind.class;
        //dao
        GeneratorUtil.generatorDao(clas,urlData);
        //mapper
phi_platform_user/src/main/java/com/hx/phip/deduction/controller/DeductionController.java
New file
@@ -0,0 +1,65 @@
package com.hx.phip.deduction.controller;
import com.hx.common.BaseController;
import com.hx.phip.deduction.service.DeductionSingleService;
import com.hx.phip.dto.DeductionDto;
import com.hx.util.StringUtils;
import com.platform.constants.LoginConstant;
import com.platform.entity.ThirtApplication;
import com.platform.exception.PlatTipsException;
import com.platform.resultTool.PlatformCode;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
/**
 * 执行划扣控制器
 * @USER: Andru
 * @DATE: 2021/12/10
 */
@RestController
@RequestMapping("/deduction")
public class DeductionController extends BaseController {
    @Resource
    private DeductionSingleService deductionSingleService;
    /**
     * 划扣记录
     */
    @PostMapping("/add")
    public void orderAdd(HttpServletRequest request, DeductionDto deductionDto) {
        // 校验参数
        checkParam(deductionDto);
        // 获取用户信息
        ThirtApplication thirtApplication= (ThirtApplication) request.getSession().getAttribute(LoginConstant.LOGIN_APPLY);
        if(thirtApplication == null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"登入失败,请登入后在试!");
        }
        // 填充接口登入信息
        deductionDto.setSourceCode(thirtApplication.getAppId());
        deductionDto.setSourceName(thirtApplication.getName());
        // 添加数据
        deductionSingleService.insertInfo(deductionDto);
    }
    /**
     * 校验参数
     * @param deductionDto 参数对象
     */
    private void checkParam(DeductionDto deductionDto){
        if(StringUtils.isEmpty(deductionDto.getUserProjectId())){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"userProjectId不能为空");
        }
        if(deductionDto.getDeductionNum() > 0){
            throw new PlatTipsException(PlatformCode.ERROR_TIPS,"数量/划扣次数需要大于0");
        }
        if(StringUtils.isEmpty(deductionDto.getFamiliesRoomName())){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"科室不能为空");
        }
    }
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionDrugsService.java
New file
@@ -0,0 +1,33 @@
package com.hx.phip.deduction.service;
import com.hx.phiappt.model.deduction.DeductionDrugs;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
public interface DeductionDrugsService {
    int selectCount(SqlSentence sqlSentence);
    void insert(DeductionDrugs deductionDrugs);
    List<DeductionDrugs> selectList(SqlSentence sqlSentence);
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    DeductionDrugs selectOne(SqlSentence sqlSentence);
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    DeductionDrugs selectOneByKey(Object object);
    DeductionDrugs selectOneByKeyBlob(Object object);
    void updateAll(DeductionDrugs deductionDrugs);
    void updateWhere(SqlSentence sqlSentence);
    void deleteOne(String delId);
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionJoinService.java
New file
@@ -0,0 +1,33 @@
package com.hx.phip.deduction.service;
import com.hx.phiappt.model.deduction.DeductionJoin;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
public interface DeductionJoinService {
    int selectCount(SqlSentence sqlSentence);
    void insert(DeductionJoin deductionJoin);
    List<DeductionJoin> selectList(SqlSentence sqlSentence);
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    DeductionJoin selectOne(SqlSentence sqlSentence);
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    DeductionJoin selectOneByKey(Object object);
    DeductionJoin selectOneByKeyBlob(Object object);
    void updateAll(DeductionJoin deductionJoin);
    void updateWhere(SqlSentence sqlSentence);
    void deleteOne(String delId);
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionProjectService.java
New file
@@ -0,0 +1,33 @@
package com.hx.phip.deduction.service;
import com.hx.phiappt.model.deduction.DeductionProject;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
public interface DeductionProjectService {
    int selectCount(SqlSentence sqlSentence);
    void insert(DeductionProject deductionProject);
    List<DeductionProject> selectList(SqlSentence sqlSentence);
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    DeductionProject selectOne(SqlSentence sqlSentence);
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    DeductionProject selectOneByKey(Object object);
    DeductionProject selectOneByKeyBlob(Object object);
    void updateAll(DeductionProject deductionProject);
    void updateWhere(SqlSentence sqlSentence);
    void deleteOne(String delId);
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/DeductionSingleService.java
New file
@@ -0,0 +1,37 @@
package com.hx.phip.deduction.service;
import com.hx.phiappt.model.deduction.DeductionSingle;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phip.dto.DeductionDto;
import java.util.List;
import java.util.Map;
public interface DeductionSingleService {
    int selectCount(SqlSentence sqlSentence);
    void insert(DeductionSingle deductionSingle);
    void insertInfo(DeductionDto deductionDto);
    List<DeductionSingle> selectList(SqlSentence sqlSentence);
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    DeductionSingle selectOne(SqlSentence sqlSentence);
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    DeductionSingle selectOneByKey(Object object);
    DeductionSingle selectOneByKeyBlob(Object object);
    void updateAll(DeductionSingle deductionSingle);
    void updateWhere(SqlSentence sqlSentence);
    void deleteOne(String delId);
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionDrugsServiceImpl.java
New file
@@ -0,0 +1,101 @@
package com.hx.phip.deduction.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hx.exception.TipsException;
import com.hx.phip.dao.mapper.DeductionDrugsMapper;
import com.hx.phiappt.model.deduction.DeductionDrugs;
import com.hx.phip.deduction.service.DeductionDrugsService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
@Transactional
@Service
public class DeductionDrugsServiceImpl implements DeductionDrugsService {
    @Resource
    private DeductionDrugsMapper deductionDrugsMapper;
    /**查询列表*/
    @Override
    public List<DeductionDrugs> selectList(SqlSentence sqlSentence) {
        return deductionDrugsMapper.selectList(sqlSentence);
    }
    /**查询列表*/
    @Override
    public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
        return deductionDrugsMapper.selectListMap(sqlSentence);
    }
    /**查询单个*/
    @Override
    public DeductionDrugs selectOne(SqlSentence sqlSentence) {
        return deductionDrugsMapper.selectOne(sqlSentence);
    }
    /**查询单个*/
    @Override
    public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
        return deductionDrugsMapper.selectOneMap(sqlSentence);
    }
    /**查询单个,大数据不拿取*/
    @Override
    public DeductionDrugs selectOneByKey(Object object) {
        return deductionDrugsMapper.selectOneByKey(object);
    }
    /**查询单个,大数据拿取*/
    @Override
    public DeductionDrugs selectOneByKeyBlob(Object object) {
        return deductionDrugsMapper.selectOneByKeyBlob(object);
    }
    /**新增*/
    @Override
    public void insert(DeductionDrugs deductionDrugs) {
        int count = deductionDrugsMapper.insert(deductionDrugs);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(DeductionDrugs deductionDrugs) {
        int count = deductionDrugsMapper.updateAll(deductionDrugs);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = deductionDrugsMapper.updateWhere(sqlSentence);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = deductionDrugsMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = deductionDrugsMapper.selectCount(sqlSentence);
        return count;
    }
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionJoinServiceImpl.java
New file
@@ -0,0 +1,101 @@
package com.hx.phip.deduction.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hx.exception.TipsException;
import com.hx.phip.dao.mapper.DeductionJoinMapper;
import com.hx.phiappt.model.deduction.DeductionJoin;
import com.hx.phip.deduction.service.DeductionJoinService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
@Transactional
@Service
public class DeductionJoinServiceImpl implements DeductionJoinService {
    @Resource
    private DeductionJoinMapper deductionJoinMapper;
    /**查询列表*/
    @Override
    public List<DeductionJoin> selectList(SqlSentence sqlSentence) {
        return deductionJoinMapper.selectList(sqlSentence);
    }
    /**查询列表*/
    @Override
    public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
        return deductionJoinMapper.selectListMap(sqlSentence);
    }
    /**查询单个*/
    @Override
    public DeductionJoin selectOne(SqlSentence sqlSentence) {
        return deductionJoinMapper.selectOne(sqlSentence);
    }
    /**查询单个*/
    @Override
    public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
        return deductionJoinMapper.selectOneMap(sqlSentence);
    }
    /**查询单个,大数据不拿取*/
    @Override
    public DeductionJoin selectOneByKey(Object object) {
        return deductionJoinMapper.selectOneByKey(object);
    }
    /**查询单个,大数据拿取*/
    @Override
    public DeductionJoin selectOneByKeyBlob(Object object) {
        return deductionJoinMapper.selectOneByKeyBlob(object);
    }
    /**新增*/
    @Override
    public void insert(DeductionJoin deductionJoin) {
        int count = deductionJoinMapper.insert(deductionJoin);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(DeductionJoin deductionJoin) {
        int count = deductionJoinMapper.updateAll(deductionJoin);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = deductionJoinMapper.updateWhere(sqlSentence);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = deductionJoinMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = deductionJoinMapper.selectCount(sqlSentence);
        return count;
    }
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionProjectServiceImpl.java
New file
@@ -0,0 +1,101 @@
package com.hx.phip.deduction.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hx.exception.TipsException;
import com.hx.phip.dao.mapper.DeductionProjectMapper;
import com.hx.phiappt.model.deduction.DeductionProject;
import com.hx.phip.deduction.service.DeductionProjectService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
@Transactional
@Service
public class DeductionProjectServiceImpl implements DeductionProjectService {
    @Resource
    private DeductionProjectMapper deductionProjectMapper;
    /**查询列表*/
    @Override
    public List<DeductionProject> selectList(SqlSentence sqlSentence) {
        return deductionProjectMapper.selectList(sqlSentence);
    }
    /**查询列表*/
    @Override
    public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
        return deductionProjectMapper.selectListMap(sqlSentence);
    }
    /**查询单个*/
    @Override
    public DeductionProject selectOne(SqlSentence sqlSentence) {
        return deductionProjectMapper.selectOne(sqlSentence);
    }
    /**查询单个*/
    @Override
    public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
        return deductionProjectMapper.selectOneMap(sqlSentence);
    }
    /**查询单个,大数据不拿取*/
    @Override
    public DeductionProject selectOneByKey(Object object) {
        return deductionProjectMapper.selectOneByKey(object);
    }
    /**查询单个,大数据拿取*/
    @Override
    public DeductionProject selectOneByKeyBlob(Object object) {
        return deductionProjectMapper.selectOneByKeyBlob(object);
    }
    /**新增*/
    @Override
    public void insert(DeductionProject deductionProject) {
        int count = deductionProjectMapper.insert(deductionProject);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(DeductionProject deductionProject) {
        int count = deductionProjectMapper.updateAll(deductionProject);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = deductionProjectMapper.updateWhere(sqlSentence);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = deductionProjectMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = deductionProjectMapper.selectCount(sqlSentence);
        return count;
    }
}
phi_platform_user/src/main/java/com/hx/phip/deduction/service/impl/DeductionSingleServiceImpl.java
New file
@@ -0,0 +1,338 @@
package com.hx.phip.deduction.service.impl;
import javax.annotation.Resource;
import com.alibaba.fastjson.JSONArray;
import com.hx.common.dao.CommonDao;
import com.hx.phiappt.common.DeductionSingleConstants;
import com.hx.phiappt.common.OrderGoodsConstants;
import com.hx.phiappt.model.*;
import com.hx.phiappt.model.deduction.*;
import com.hx.phiappt.model.user.UserProject;
import com.hx.phiappt.model.warehouse.ShopWarehouse;
import com.hx.phip.dao.mapper.*;
import com.hx.phip.dto.DeductionDto;
import com.hx.util.StringUtils;
import com.platform.exception.PlatTipsException;
import com.platform.resultTool.PlatformCode;
import com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hx.exception.TipsException;
import com.hx.phip.deduction.service.DeductionSingleService;
import com.hx.mybatisTool.SqlSentence;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@Transactional
@Service
public class DeductionSingleServiceImpl implements DeductionSingleService {
    @Resource
    private CommonDao commonDao;
    @Resource
    private DeductionSingleMapper deductionSingleMapper;
    @Resource
    private DeductionProjectMapper deductionProjectMapper;
    /**查询列表*/
    @Override
    public List<DeductionSingle> selectList(SqlSentence sqlSentence) {
        return deductionSingleMapper.selectList(sqlSentence);
    }
    /**查询列表*/
    @Override
    public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
        return deductionSingleMapper.selectListMap(sqlSentence);
    }
    /**查询单个*/
    @Override
    public DeductionSingle selectOne(SqlSentence sqlSentence) {
        return deductionSingleMapper.selectOne(sqlSentence);
    }
    /**查询单个*/
    @Override
    public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
        return deductionSingleMapper.selectOneMap(sqlSentence);
    }
    /**查询单个,大数据不拿取*/
    @Override
    public DeductionSingle selectOneByKey(Object object) {
        return deductionSingleMapper.selectOneByKey(object);
    }
    /**查询单个,大数据拿取*/
    @Override
    public DeductionSingle selectOneByKeyBlob(Object object) {
        return deductionSingleMapper.selectOneByKeyBlob(object);
    }
    /**新增*/
    @Override
    public void insert(DeductionSingle deductionSingle) {
        int count = deductionSingleMapper.insert(deductionSingle);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    /**新增*/
    @Override
    public void insertInfo(DeductionDto deductionDto) {
        UserProject userProject = commonDao.selectOneByKey(UserProjectMapper.class,deductionDto.getUserProjectId());
        if(userProject == null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到你的项目信息!");
        }
        // 项目划扣处理
        if(userProject.getType() != null && OrderGoodsConstants.TYPE_PROJECT.equals(userProject.getType())) {
            // 判断用户是否存在
            User user = commonDao.selectOneByKey(UserMapper.class,userProject.getUserId());
            if(user == null){
                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到你的项目的用户信息!");
            }
            // 处理划扣项目清单
            DeductionSingle deductionSingle = new DeductionSingle();
            deductionSingle.setUserId(userProject.getUserId());
            deductionSingle.setType(DeductionSingleConstants.TYPE_SELF_ADD);
            deductionSingle.setCommonId(deductionDto.getUserProjectId());
            deductionSingle.setSourceCode(deductionDto.getSourceCode());
            deductionSingle.setSourceName(deductionDto.getSourceName());
            deductionSingle.setStatus(DeductionSingleConstants.STATUS_DONE_EXECUTE);
            deductionSingle.setRemarkInfo(deductionDto.getRemarkInfo());
            int count = deductionSingleMapper.insert(deductionSingle);
            if (count != 1) {
                throw new TipsException("新增失败!");
            }
            // 校验项目信息是否存在
            Project project = commonDao.selectOneByKey(ProjectMapper.class,userProject.getGoodsId());
            if(project == null){
                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到你要执行项目的项目信息!");
            }
            // 处理划扣项目
            DeductionProject deductionProject = new DeductionProject();
            deductionProject.setDeductionSingleId(deductionSingle.getId());
            deductionProject.setProjectId(userProject.getGoodsId());
            deductionProject.setProjectNo(userProject.getGoodsNo());
            deductionProject.setProjectName(project.getName());
            deductionProject.setPrice(project.getPrice());
            deductionProject.setNum(deductionDto.getDeductionNum());
            deductionProject.setFamiliesRoomName(deductionDto.getFamiliesRoomName());
            deductionProject.setSpecification(project.getSpecification());
            deductionProject.setUseDuration(project.getUseDuration());
            deductionProject.setPalsyDuration(project.getPalsyDuration());
            deductionProject.setExecuteStartTime(deductionDto.getExecuteStartTime());
            deductionProject.setExecuteEndTime(deductionDto.getExecuteEndTime());
            deductionProject.setRemarkInfo(deductionSingle.getRemarkInfo());
            count = deductionProjectMapper.insert(deductionProject);
            if (count != 1) {
                throw new TipsException("新增划扣项目记录失败!");
            }
            // 处理参与人员信息
            if(!StringUtils.isEmpty(deductionDto.getDeductionJoinJson())){
                List<DeductionJoin> deductionJoinList = JSONArray.parseArray(deductionDto.getDeductionJoinJson(), DeductionJoin.class);
                if(deductionJoinList !=null && deductionJoinList.size() > 0) {
                    deductionJoinList.forEach(deductionJoin -> {
                        // 判断治疗时常
                        if(deductionJoin.getUseDuration() <= 0){
                            throw new PlatTipsException(PlatformCode.ERROR_APPIS,"治疗时长必须大于 0!");
                        }
                        // 判断角色id
                        if(StringUtils.isEmpty(deductionJoin.getRoleId())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"员工角色id不能为空!");
                        }else{
                            EmployeeRole employeeRole = commonDao.selectOneByKey(EmployeeRoleMapper.class, deductionJoin.getRoleId());
                            if(employeeRole == null){
                                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"员工角色信息不存在!");
                            }else{
                                deductionJoin.setRoleName(employeeRole.getRoleName());
                            }
                        }
                        // 判断员工id
                        if(StringUtils.isEmpty(deductionJoin.getEmployeeId())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"员工id不能为空!");
                        }else{
                            Employee employee = commonDao.selectOneByKey(EmployeeMapper.class,deductionJoin.getEmployeeId());
                            if(employee == null){
                                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"员工信息不存在!");
                            }else{
                                deductionJoin.setEmployeeName(employee.getCnName());
                            }
                        }
                        deductionJoin.setDeductionSingleId(deductionSingle.getId());
                        deductionJoin.setDeductionProjectId(deductionProject.getId());
                        int insert = commonDao.insert(DeductionJoinMapper.class, deductionJoin);
                        if (insert != 1) {
                            throw new TipsException("新增参与人员记录失败!");
                        }
                    });
                }
            }
            // 处理消耗物品信息
            if(!StringUtils.isEmpty(deductionDto.getDeductionDrugsJson())){
                List<DeductionDrugs> deductionDrugsList = JSONArray.parseArray(deductionDto.getDeductionDrugsJson(), DeductionDrugs.class);
                if(deductionDrugsList != null && deductionDrugsList.size() > 0){
                    deductionDrugsList.forEach(deductionDrugs -> {
                        if(deductionDrugs.getNum() == null || deductionDrugs.getNum() <= 0){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"耗材/药品数量不能为空且要大于0!");
                        }
                        // 判断耗材/药品信息
                        if(StringUtils.isEmpty(deductionDrugs.getConsumablesId())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"耗材/药品id不能为空!");
                        }else{
                            Consumables consumables = commonDao.selectOneByKey(ConsumablesMapper.class,deductionDrugs.getConsumablesId());
                            if(consumables ==null){
                                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到耗材/药品信息!");
                            }else{
                                deductionDrugs.setDrugsNo(consumables.getSerialNumber());
                                deductionDrugs.setDrugsName(consumables.getName());
                                deductionDrugs.setSpecs(consumables.getSpec());
                                deductionDrugs.setUnitName(consumables.getUnitName());
                                deductionDrugs.setPrice(consumables.getPrice());
                            }
                        }
                        // 判断库存信息
                        if(StringUtils.isEmpty(deductionDrugs.getWarehouseId())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"仓库信息不能为空!");
                        }else{
                            ShopWarehouse shopWarehouse = commonDao.selectOneByKey(ShopWarehouseMapper.class,deductionDrugs.getWarehouseId());
                            if(shopWarehouse == null){
                                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到仓库信息!");
                            }
                        }
                        // 判断批次信息
                        if(StringUtils.isEmpty(deductionDrugs.getBatchNo())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"批次号信息不能为空!");
                        }
                        deductionDrugs.setDeductionSingleId(deductionSingle.getId());
                        deductionDrugs.setDeductionProjectId(deductionProject.getId());
                        int insert = commonDao.insert(DeductionDrugsMapper.class, deductionDrugs);
                        if (insert != 1) {
                            throw new TipsException("新增消耗物品记录失败!");
                        }
                    });
                }
            }
            // 处理治疗参数(设备)信息
            if(!StringUtils.isEmpty(deductionDto.getDeductionDeviceParameterJson())){
                List<DeductionDeviceParameter> deductionDeviceParameterList = JSONArray.parseArray(deductionDto.getDeductionDeviceParameterJson(), DeductionDeviceParameter.class);
                if(deductionDeviceParameterList !=null && deductionDeviceParameterList.size() > 0){
                    deductionDeviceParameterList.forEach(deductionDeviceParameter -> {
                        // 判断选值是否为空
                        if(StringUtils.isEmpty(deductionDeviceParameter.getOptionalValue())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"实际操作值不能为空!");
                        }
                        // 判断设备id是否为空
                        if(StringUtils.isEmpty(deductionDeviceParameter.getDeviceNoId())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"设备id不能为空!");
                        }else{
                            DeviceNo deviceNo = commonDao.selectOneByKey(DeviceNoMapper.class,deductionDeviceParameter.getDeviceNoId());
                            if(deviceNo == null){
                                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到您所选的设备信息!");
                            }else{
                                deductionDeviceParameter.setDeviceName(deviceNo.getDeviceNo());
                            }
                        }
                        // 判断设备参数id是否为空
                        if(StringUtils.isEmpty(deductionDeviceParameter.getDeviceParameterId())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"设备参数id不能为空!");
                        }else{
                            DeviceParameter deviceParameter= commonDao.selectOneByKey(DeviceParameterMapper.class,deductionDeviceParameter.getDeviceParameterId());
                            if(deviceParameter == null){
                                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"未找到您所选的设备参数信息!");
                            }else{
                                deductionDeviceParameter.setParameterName(deviceParameter.getParameterName());
                                deductionDeviceParameter.setParameterUntil(deviceParameter.getParameterUntil());
                                deductionDeviceParameter.setReference(deviceParameter.getReference());
                            }
                        }
                        deductionDeviceParameter.setDeductionSingleId(deductionSingle.getId());
                        deductionDeviceParameter.setDeductionProjectId(deductionProject.getId());
                        int insert = commonDao.insert(DeductionDeviceParameterMapper.class, deductionDeviceParameter);
                        if (insert != 1) {
                            throw new TipsException("新增设备治疗参数记录失败!");
                        }
                    });
                }
            }
            // 处理客户签名信息
            if(!StringUtils.isEmpty(deductionDto.getDeductionSignJson())){
                List<DeductionSign> deductionSignList = JSONArray.parseArray(deductionDto.getDeductionSignJson(), DeductionSign.class);
                if(deductionSignList != null && deductionSignList.size() > 0){
                    deductionSignList.forEach(deductionSign -> {
                        // 判断签名类型
                        if(StringUtils.isEmpty(deductionSign.getSignType())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"签名类型不能未空!");
                        }
                        // 判断签名类型名称
                        if(StringUtils.isEmpty(deductionSign.getSignTypeName())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"签名类型名称不能未空!");
                        }
                        // 判断签名图片地址
                        if(StringUtils.isEmpty(deductionSign.getSignUrl())){
                            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"签名图片地址不能未空!");
                        }
                        deductionSign.setDeductionSingleId(deductionSingle.getId());
                        deductionSign.setDeductionProjectId(deductionProject.getId());
                        int insert = commonDao.insert(DeductionSignMapper.class, deductionSign);
                        if (insert != 1) {
                            throw new TipsException("新增签名记录失败!");
                        }
                    });
                }
            }
            //处理治疗图片信息
        }else{
            throw new PlatTipsException(PlatformCode.ERROR_TIPS,"商品划扣还在开发中!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(DeductionSingle deductionSingle) {
        int count = deductionSingleMapper.updateAll(deductionSingle);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = deductionSingleMapper.updateWhere(sqlSentence);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = deductionSingleMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = deductionSingleMapper.selectCount(sqlSentence);
        return count;
    }
}
phi_platform_user/src/main/java/com/hx/phip/dto/DeductionDto.java
New file
@@ -0,0 +1,148 @@
package com.hx.phip.dto;
import java.util.Date;
/**
 * 划扣接受参数
 * author:andru
 * Date:2021/12/10 14:41
 */
public class DeductionDto {
    // 用户项目id
    private String userProjectId;
    // 备注信息
    private String remarkInfo;
    // 来源代码(应用appId)
    private String sourceCode;
    // 来源名称
    private String sourceName;
    // 数量/划扣次数
    private Integer deductionNum = 0;
    // 科室
    private String familiesRoomName;
    // 执行开始时间
    private Date executeStartTime;
    // 执行结束时间
    private Date executeEndTime;
    // 参与人员数据 json
    private String deductionJoinJson;
    // 划扣项目消耗处方/药品数据 json
    private String deductionDrugsJson;
    // 划扣设备参数数据 json
    private String deductionDeviceParameterJson;
    // 客户签名数据 json
    private String deductionSignJson;
    public DeductionDto() {
    }
    public String getUserProjectId() {
        return userProjectId;
    }
    public String getRemarkInfo() {
        return remarkInfo;
    }
    public void setRemarkInfo(String remarkInfo) {
        this.remarkInfo = remarkInfo;
    }
    public void setUserProjectId(String userProjectId) {
        this.userProjectId = userProjectId;
    }
    public String getSourceCode() {
        return sourceCode;
    }
    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }
    public String getSourceName() {
        return sourceName;
    }
    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }
    public Integer getDeductionNum() {
        return deductionNum;
    }
    public void setDeductionNum(Integer deductionNum) {
        this.deductionNum = deductionNum;
    }
    public String getFamiliesRoomName() {
        return familiesRoomName;
    }
    public void setFamiliesRoomName(String familiesRoomName) {
        this.familiesRoomName = familiesRoomName;
    }
    public Date getExecuteStartTime() {
        return executeStartTime;
    }
    public void setExecuteStartTime(Date executeStartTime) {
        this.executeStartTime = executeStartTime;
    }
    public Date getExecuteEndTime() {
        return executeEndTime;
    }
    public void setExecuteEndTime(Date executeEndTime) {
        this.executeEndTime = executeEndTime;
    }
    public String getDeductionJoinJson() {
        return deductionJoinJson;
    }
    public void setDeductionJoinJson(String deductionJoinJson) {
        this.deductionJoinJson = deductionJoinJson;
    }
    public String getDeductionDrugsJson() {
        return deductionDrugsJson;
    }
    public void setDeductionDrugsJson(String deductionDrugsJson) {
        this.deductionDrugsJson = deductionDrugsJson;
    }
    public String getDeductionDeviceParameterJson() {
        return deductionDeviceParameterJson;
    }
    public void setDeductionDeviceParameterJson(String deductionDeviceParameterJson) {
        this.deductionDeviceParameterJson = deductionDeviceParameterJson;
    }
    public String getDeductionSignJson() {
        return deductionSignJson;
    }
    public void setDeductionSignJson(String deductionSignJson) {
        this.deductionSignJson = deductionSignJson;
    }
}
phi_platform_user/src/main/java/com/hx/phip/order/service/impl/OrderServiceImpl.java
@@ -11,6 +11,8 @@
import com.hx.phip.order.service.OrderService;
import com.hx.phip.service.*;
import com.hx.phip.tool.CreateNo;
import com.hx.phip.user.service.UserProjectItemService;
import com.hx.phip.user.service.UserProjectService;
import com.hx.util.SimpleEncrypt;
import com.hx.util.StringUtils;
import com.platform.exception.PlatTipsException;
phi_platform_user/src/main/java/com/hx/phip/user/service/UserProjectItemService.java
File was renamed from phi_platform_user/src/main/java/com/hx/phip/service/UserProjectItemService.java
@@ -1,4 +1,4 @@
package com.hx.phip.service;
package com.hx.phip.user.service;
import com.hx.phiappt.model.user.UserProjectItem;
import com.hx.mybatisTool.SqlSentence;
phi_platform_user/src/main/java/com/hx/phip/user/service/UserProjectService.java
File was renamed from phi_platform_user/src/main/java/com/hx/phip/service/UserProjectService.java
@@ -1,4 +1,4 @@
package com.hx.phip.service;
package com.hx.phip.user.service;
import com.hx.phiappt.model.user.UserProject;
import com.hx.mybatisTool.SqlSentence;
phi_platform_user/src/main/java/com/hx/phip/user/service/impl/UserProjectItemServiceImpl.java
File was renamed from phi_platform_user/src/main/java/com/hx/phip/service/impl/UserProjectItemServiceImpl.java
@@ -1,4 +1,4 @@
package com.hx.phip.service.impl;
package com.hx.phip.user.service.impl;
import javax.annotation.Resource;
@@ -8,7 +8,7 @@
import com.hx.exception.TipsException;
import com.hx.phip.dao.mapper.UserProjectItemMapper;
import com.hx.phiappt.model.user.UserProjectItem;
import com.hx.phip.service.UserProjectItemService;
import com.hx.phip.user.service.UserProjectItemService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
phi_platform_user/src/main/java/com/hx/phip/user/service/impl/UserProjectServiceImpl.java
File was renamed from phi_platform_user/src/main/java/com/hx/phip/service/impl/UserProjectServiceImpl.java
@@ -1,4 +1,4 @@
package com.hx.phip.service.impl;
package com.hx.phip.user.service.impl;
import javax.annotation.Resource;
@@ -8,7 +8,7 @@
import com.hx.exception.TipsException;
import com.hx.phip.dao.mapper.UserProjectMapper;
import com.hx.phiappt.model.user.UserProject;
import com.hx.phip.service.UserProjectService;
import com.hx.phip.user.service.UserProjectService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
phi_platform_user/src/main/java/com/hx/phip/warehouse/service/ShopWarehouseService.java
New file
@@ -0,0 +1,33 @@
package com.hx.phip.warehouse.service;
import com.hx.phiappt.model.warehouse.ShopWarehouse;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
public interface ShopWarehouseService {
    int selectCount(SqlSentence sqlSentence);
    void insert(ShopWarehouse shopWarehouse);
    List<ShopWarehouse> selectList(SqlSentence sqlSentence);
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    ShopWarehouse selectOne(SqlSentence sqlSentence);
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    ShopWarehouse selectOneByKey(Object object);
    ShopWarehouse selectOneByKeyBlob(Object object);
    void updateAll(ShopWarehouse shopWarehouse);
    void updateWhere(SqlSentence sqlSentence);
    void deleteOne(String delId);
}
phi_platform_user/src/main/java/com/hx/phip/warehouse/service/impl/ShopWarehouseServiceImpl.java
New file
@@ -0,0 +1,101 @@
package com.hx.phip.warehouse.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hx.exception.TipsException;
import com.hx.phip.dao.mapper.ShopWarehouseMapper;
import com.hx.phiappt.model.warehouse.ShopWarehouse;
import com.hx.phip.warehouse.service.ShopWarehouseService;
import com.hx.mybatisTool.SqlSentence;
import java.util.List;
import java.util.Map;
@Transactional
@Service
public class ShopWarehouseServiceImpl implements ShopWarehouseService {
    @Resource
    private ShopWarehouseMapper shopWarehouseMapper;
    /**查询列表*/
    @Override
    public List<ShopWarehouse> selectList(SqlSentence sqlSentence) {
        return shopWarehouseMapper.selectList(sqlSentence);
    }
    /**查询列表*/
    @Override
    public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) {
        return shopWarehouseMapper.selectListMap(sqlSentence);
    }
    /**查询单个*/
    @Override
    public ShopWarehouse selectOne(SqlSentence sqlSentence) {
        return shopWarehouseMapper.selectOne(sqlSentence);
    }
    /**查询单个*/
    @Override
    public Map<String,Object> selectOneMap(SqlSentence sqlSentence) {
        return shopWarehouseMapper.selectOneMap(sqlSentence);
    }
    /**查询单个,大数据不拿取*/
    @Override
    public ShopWarehouse selectOneByKey(Object object) {
        return shopWarehouseMapper.selectOneByKey(object);
    }
    /**查询单个,大数据拿取*/
    @Override
    public ShopWarehouse selectOneByKeyBlob(Object object) {
        return shopWarehouseMapper.selectOneByKeyBlob(object);
    }
    /**新增*/
    @Override
    public void insert(ShopWarehouse shopWarehouse) {
        int count = shopWarehouseMapper.insert(shopWarehouse);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(ShopWarehouse shopWarehouse) {
        int count = shopWarehouseMapper.updateAll(shopWarehouse);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = shopWarehouseMapper.updateWhere(sqlSentence);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = shopWarehouseMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = shopWarehouseMapper.selectCount(sqlSentence);
        return count;
    }
}