长泰集采非集采问题,产品关联;数据库升级问题

20231126-yw^2
anthonywj 1 year ago
parent 1eea81cef6
commit 88848d671d

@ -7,7 +7,6 @@ import com.glxp.api.dao.system.DbVersionDao;
import com.glxp.api.entity.system.DbVersionEntity;
import com.glxp.api.entity.system.SchemaData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
@ -27,16 +26,10 @@ public class HdSchemaExecutor implements ApplicationRunner {
@Resource
DbVersionDao hdCommonDao;
@Value("${initSql:true}")
private boolean initSql;
private List<SchemaData> schema = new ArrayList<>();
@Override
public void run(ApplicationArguments args) throws Exception {
if (!initSql) {
return;
}
//初始版本列表
buildSchemas();
//定义sql文件路径
@ -49,7 +42,7 @@ public class HdSchemaExecutor implements ApplicationRunner {
String sql = IoUtil.readUtf8(inputStream);
try {
//判断版本表是否存在
int count = hdCommonDao.selectTableExist("sys_db_version");
int count = hdCommonDao.selectTableExist("hd_version");
if (count == 0) {
hdCommonDao.updateSql(sql);
}
@ -84,5 +77,7 @@ public class HdSchemaExecutor implements ApplicationRunner {
// schema.add(new SchemaData("v2.1", "schema_v2.1.sql"));
// schema.add(new SchemaData("v2.2", "schema_v2.2.sql"));
schema.add(new SchemaData("v2.3", "schema_v2.3.sql"));
// schema.add(new SchemaData("v2.4", "schema_v2.4.sql"));
}
}

@ -342,6 +342,7 @@ public class UdiRelevanceController extends BaseController {
udiProductEntity.setAllowNoProduct(udiRelevanceSaveRequest.getAllowNoProduct());
udiProductEntity.setAllowNoSerial(udiRelevanceSaveRequest.getAllowNoSerial());
udiProductEntity.setZxxsbzbhsydysl(udiRelevanceEntity.getUseNum());
udiProductEntity.setGroupBuy(udiRelevanceSaveRequest.getGroupBuy());
udiProductEntity.setBasicPrductRemak1(udiRelevanceSaveRequest.getBasicPrductRemak1());
udiProductEntity.setBasicPrductRemak2(udiRelevanceSaveRequest.getBasicPrductRemak2());
udiProductEntity.setBasicPrductRemak3(udiRelevanceSaveRequest.getBasicPrductRemak3());

@ -224,6 +224,8 @@ public class ThrProductsAddDiController {
udiProductEntity.setBasicPrductRemak6(thrProductsAddDiResponse.getBasicPrductRemak6());
udiProductEntity.setBasicPrductRemak7(thrProductsAddDiResponse.getBasicPrductRemak7());
udiProductEntity.setBasicPrductRemak8(thrProductsAddDiResponse.getBasicPrductRemak8());
udiProductEntity.setGroupBuy(thrProductsAddDiResponse.getGroupBuy());
udiRelevanceEntity.setGroupBuy(thrProductsAddDiResponse.getGroupBuy());
udiProductEntity.setNameCode(null);
udiProductService.updateUdiInfoByUuid(udiProductEntity);
UdiRelevanceEntity udiRelevanceEntity1 = new UdiRelevanceEntity();

@ -282,6 +282,11 @@ public class ThrProductsAddDiEntity {
@ApiModelProperty(value = "关联ID主键")
private String relId;
@TableField(value = "groupBuy")
@ApiModelProperty(value = "集采")
private Boolean groupBuy;
/**
* 12
*/

@ -21,4 +21,5 @@ public class SupplementRequest {
private String spmc;
private String cpms;
private String price;
private Boolean groupBuy;
}

@ -49,6 +49,7 @@ public class AddThrDiProductsRequest {
private String basicPrductRemak8;
private String deviceRecordKey;
private Boolean groupBuy;
}

@ -122,7 +122,7 @@ public class ThrProductsAddDiService extends ServiceImpl<ThrProductsAddDiDao, Th
thrProductsAddDiEntity.setYlqxzcrbarmc(productInfoEntity.getYlqxzcrbarmc());
thrProductsAddDiEntity.setDeviceRecordKey(productInfoEntity.getDeviceRecordKey());
thrProductsAddDiEntity.setZczbhhzbapzbh(productInfoEntity.getZczbhhzbapzbh());
thrProductsAddDiEntity.setGroupBuy(thrDiProductsRequest.getGroupBuy());
//设置编辑区参数
thrProductsAddDiEntity.setSptm(thrDiProductsRequest.getSptm());
thrProductsAddDiEntity.setYbbm(thrDiProductsRequest.getYbbm());
@ -134,7 +134,7 @@ public class ThrProductsAddDiService extends ServiceImpl<ThrProductsAddDiDao, Th
thrProductsAddDiEntity.setCreateTime(date);
thrProductsAddDiEntity.setUpdateTime(new Date());
thrProductsAddDiEntity.setStatus(1); //未审核
thrProductsAddDiEntity.setStatus(1); //..
thrProductsAddDiEntity.setSelectThridSysStr(JSONUtil.toJsonStr(thrDiProductsRequest.getSelectThirdSys()));
list.add(thrProductsAddDiEntity);
}

@ -78,6 +78,13 @@ public class SupplementVailUtil {
}
}
basicProductSetEntity = basicProductSetEntityMap.get("groupBuy");
if (isMustFill(type, basicProductSetEntity)) {
if (supplementRequest.getGroupBuy() == null) {
return "请选择是否集采";
}
}
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak1");
if (isMustFill(type, basicProductSetEntity)) {

@ -91,7 +91,8 @@
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,basic_products.cphhhbh,
basic_products.categoryName,
basic_products.cphhhbh,
basic_products.hchzsb
FROM (company_product_relevance
inner JOIN basic_udirel
@ -674,6 +675,9 @@
<if test="basicPrductRemak8 != null">
basicPrductRemak8=#{basicPrductRemak8},
</if>
<if test="groupBuy != null">
groupBuy=#{groupBuy},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>

@ -16,7 +16,7 @@
qxlb, tyshxydm, zczbhhzbapzbh,
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
supName, model, `standard`,
qtbm, zczyxqz, relId, type, deviceRecordKey)
qtbm, zczyxqz, relId, type, deviceRecordKey, groupBuy)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{item.uuid},
@ -25,8 +25,6 @@
#{item.auditTime},
#{item.remark},
#{item.auditUser},
#{item.status},
#{item.thirdSysFk},
#{item.code},
@ -44,7 +42,7 @@
, #{item.flbm}, #{item.qxlb}, #{item.tyshxydm}, #{item.zczbhhzbapzbh}
, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc}, #{item.updateTime}, #{item.supName}, #{item.model}
, #{item.standard}, #{item.qtbm}, #{item.standard}, #{item.zczyxqz}, #{item.type},
#{item.deviceRecordKey})
#{item.deviceRecordKey}, #{item.groupBuy})
</foreach>
</insert>
@ -126,6 +124,9 @@
<if test="selectThridSysStr != null">
`selectThridSysStr`=#{selectThridSysStr},
</if>
<if test="groupBuy != null">
`groupBuy`=#{groupBuy},
</if>
</trim>
WHERE id = #{id}
</update>
@ -231,9 +232,9 @@
<if test="status != null">
AND tdi.status = #{status}
</if>
<if test="diType != null">
AND updateTime &lt;= "2023-04-5 00:00:00"
</if>
<!-- <if test="diType != null">-->
<!-- AND updateTime &lt;= "2023-04-5 00:00:00"-->
<!-- </if>-->
</where>
</select>
</mapper>

@ -696,3 +696,6 @@ CALL Pro_Temp_ColumnWork('io_order_detail_code', 'sterDate', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_result', 'sterBatchNo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_result', 'sterDate', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'cphhhbh', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('thr_products_add_di', 'groupBuy', 'tinyint', 1);

Loading…
Cancel
Save