Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.AcceptanceInfoDO;
|
||||
import com.cool.store.mapper.AcceptanceInfoMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午7:47
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Repository
|
||||
public class AcceptanceInfoDAO {
|
||||
@Resource
|
||||
private AcceptanceInfoMapper acceptanceInfoMapper;
|
||||
|
||||
public Long insertAcceptanceInfo(AcceptanceInfoDO acceptanceInfoDO){
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return null;
|
||||
}
|
||||
acceptanceInfoMapper.insert(acceptanceInfoDO);
|
||||
return acceptanceInfoDO.getId();
|
||||
}
|
||||
public List<AcceptanceInfoDO> selectAcceptanceInfo(){
|
||||
return acceptanceInfoMapper.selectShopIdListBySignatures();
|
||||
}
|
||||
public Integer updateAcceptanceInfo(AcceptanceInfoDO acceptanceInfoDO){
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return 0;
|
||||
}
|
||||
return acceptanceInfoMapper.updateByShopIDSelective(acceptanceInfoDO);
|
||||
}
|
||||
public AcceptanceInfoDO selectByShopId (Long shopId){
|
||||
if (Objects.isNull(shopId)){
|
||||
return null;
|
||||
}
|
||||
return acceptanceInfoMapper.selectByShopId(shopId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import com.cool.store.mapper.AssessmentDataMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午10:38
|
||||
* @Version 1.0
|
||||
* @注释: AssessmentDataDO
|
||||
*/
|
||||
@Repository
|
||||
public class AssessmentDataDAO {
|
||||
@Resource
|
||||
private AssessmentDataMapper assessmentDataMapper;
|
||||
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
||||
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
|
||||
assessmentDataMapper.insert(assessmentDataDO);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
public Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
||||
|
||||
return assessmentDataMapper.batchUpdate(assessmentDataDOS);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.TempUserDetailDO;
|
||||
import com.cool.store.mapper.TempUserDetailMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
@@ -14,4 +16,20 @@ public class TempUserDetailDAO {
|
||||
|
||||
@Resource
|
||||
private TempUserDetailMapper tempUserDetailMapper;
|
||||
|
||||
public List<TempUserDetailDO> userList(Long shopId) {
|
||||
return tempUserDetailMapper.select(TempUserDetailDO.builder().deleted(false).shopId(shopId).build());
|
||||
}
|
||||
|
||||
public TempUserDetailDO selectByIdCard(String idCard) {
|
||||
return tempUserDetailMapper.selectOne(TempUserDetailDO.builder().deleted(false).idCard(idCard).build());
|
||||
}
|
||||
|
||||
public int insertSelective(TempUserDetailDO detailDO) {
|
||||
return tempUserDetailMapper.insertSelective(detailDO);
|
||||
}
|
||||
|
||||
public TempUserDetailDO selectById(Long id) {
|
||||
return tempUserDetailMapper.selectOne(TempUserDetailDO.builder().id(id).build());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.AcceptanceInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:根据shopid查询
|
||||
*/
|
||||
List<AcceptanceInfoDO> selectShopIdListBySignatures();
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:根据shopID修改
|
||||
*/
|
||||
Integer updateByShopIDSelective(AcceptanceInfoDO acceptanceInfoDO);
|
||||
|
||||
AcceptanceInfoDO selectByShopId(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
|
||||
Integer batchUpdate( List<AssessmentDataDO> AssessmentDataDOS);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.mapper;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.dto.point.LineCountDTO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import com.cool.store.request.PreparationRequest;
|
||||
@@ -67,12 +68,6 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
*/
|
||||
List<ShopInfoDO> getShopListByIds(@Param("shopIds")List<Long> shopIds);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:获取筹建阶段shopid
|
||||
*/
|
||||
List<Long> queryShopIdListByStage();
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
@@ -86,4 +81,5 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
List<PreparationDTO> ListByCondition(@Param("request") PreparationRequest request);
|
||||
|
||||
Long getRegionIdByid(@Param("shopId") Long shopId);
|
||||
}
|
||||
|
||||
ShopInfoDO selectByStoreNum(@Param("storeNum") String storeNum);}
|
||||
@@ -20,4 +20,62 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
<sql id="baseColumn">
|
||||
id,shop_id,actual_entry_time,planned_completion_time,planned_start_time,decoration_planned_completion_time,
|
||||
decoration_planned_start_time,construction_completion_time,engineering_acceptance_signatures,
|
||||
operations_acceptance_signatures,partner_acceptance_signatures,
|
||||
create_time,update_time,deleted
|
||||
</sql>
|
||||
<update id="updateByShopIDSelective">
|
||||
update xfsg_acceptance_info
|
||||
<set>
|
||||
<if test="actualEntryTime != null">
|
||||
actual_entry_time = #{actualEntryTime} ,
|
||||
</if>
|
||||
<if test="plannedCompletionTime != null">
|
||||
planned_completion_time = #{plannedCompletionTime} ,
|
||||
</if>
|
||||
<if test="plannedStartTime != null">
|
||||
planned_start_time = #{plannedStartTime} ,
|
||||
</if>
|
||||
<if test="decorationPlannedCompletionTime != null">
|
||||
decoration_planned_completion_time = #{decorationPlannedCompletionTime} ,
|
||||
</if>
|
||||
<if test="decorationPlannedStartTime != null">
|
||||
decoration_planned_start_time = #{decorationPlannedStartTime} ,
|
||||
</if>
|
||||
<if test="constructionCompletionTime != null">
|
||||
construction_completion_time = #{constructionCompletionTime} ,
|
||||
</if>
|
||||
<if test="engineeringAcceptanceSignatures != null">
|
||||
engineering_acceptance_signatures = #{engineeringAcceptanceSignatures} ,
|
||||
</if>
|
||||
<if test="operationsAcceptanceSignatures != null">
|
||||
operations_acceptance_signatures = #{operationsAcceptanceSignatures} ,
|
||||
</if>
|
||||
<if test="partnerAcceptanceSignatures != null">
|
||||
partner_acceptance_signatures = #{partnerAcceptanceSignatures} ,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime} ,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted} ,
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
<select id="selectShopIdListBySignatures" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select <include refid="baseColumn"/>
|
||||
from xfsg_acceptance_info a
|
||||
left join join xfsg_shop_stage_info b on a.shop_id = b.shop_id
|
||||
where b.shop_sub_stage_status = 1200 and a.deleted = 0
|
||||
</select>
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select
|
||||
<include refid="baseColumn"/>
|
||||
from xfsg_acceptance_info
|
||||
where shop_id = #{shopId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -14,4 +14,31 @@
|
||||
<result column="reason" jdbcType="VARCHAR" property="reason" />
|
||||
<result column="comments" jdbcType="VARCHAR" property="comments" />
|
||||
</resultMap>
|
||||
<update id="batchUpdate">
|
||||
update xfsg_assessment_data
|
||||
<set>
|
||||
qualified = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.qualified}
|
||||
</foreach>,
|
||||
score = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.score}
|
||||
</foreach>,
|
||||
reason = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.reason}
|
||||
</foreach>,
|
||||
comments = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.comments}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
<foreach collection="addShopStageList" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -73,12 +73,7 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryShopIdListByStage" resultType="java.lang.Long">
|
||||
select id
|
||||
from xfsg_shop_info
|
||||
where shop_stage = 2
|
||||
and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="queryStoreNumeListByid" resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
select id as shopId,store_num as storeNum
|
||||
from xfsg_shop_info
|
||||
@@ -155,6 +150,11 @@
|
||||
join region_${enterpriseId} r on r.id = xsi.region_id
|
||||
where xsi.id = #{shopId}
|
||||
</select>
|
||||
<select id="selectByStoreNum" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
select <include refid="allColumn"/>
|
||||
from xfsg_shop_info
|
||||
where store_num = #{storeNum}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -14,6 +14,7 @@
|
||||
<result column="sex" jdbcType="VARCHAR" property="sex" />
|
||||
<result column="age" jdbcType="INTEGER" property="age" />
|
||||
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="educational" jdbcType="TINYINT" property="educational" />
|
||||
<result column="role_id" jdbcType="BIGINT" property="roleId" />
|
||||
<result column="id_card_positive_url" jdbcType="VARCHAR" property="idCardPositiveUrl" />
|
||||
|
||||
Reference in New Issue
Block a user