1.设置补单类型时更新对应类型的补单类型值

master
MrZhai 3 years ago
parent edd716eede
commit 2eaf9ce832

@ -41,4 +41,12 @@ public interface BussinessTypeDao {
* @return
*/
List<BussinessTypeEntity> selectCandidateBussinsessTypes(String mainAction);
/**
*
*
* @param supplementOrderType
* @param action
*/
void updateSupplementOrderType(@Param("supplementOrderType") String supplementOrderType, @Param("action") String action);
}

@ -112,6 +112,11 @@ public class BussinessTypeServiceImpl implements BussinessTypeService {
@Override
public boolean updateBussinessType(BussinessTypeEntity bussinessTypeEntity) {
//更新对应单据类型补单类型
BussinessTypeEntity correspondType = bussinessTypeDao.selectByAction(bussinessTypeEntity.getSupplementOrderType());
if (correspondType.getCorpType() == 1) {
bussinessTypeDao.updateSupplementOrderType(bussinessTypeEntity.getSupplementOrderType(), bussinessTypeEntity.getAction());
}
return bussinessTypeDao.updateBussinessType(bussinessTypeEntity);
}

@ -1,14 +1,11 @@
package com.glxp.sale.admin.thread;
import com.glxp.sale.admin.dao.info.ScheduledDao;
import com.glxp.sale.admin.entity.info.ScheduledEntity;
import com.glxp.sale.admin.req.udid.ScheduledRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -25,7 +22,7 @@ public class IoErpCheckTask implements SchedulingConfigurer {
@Override
public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
scheduledTaskRegistrar.addTriggerTask(() -> process(),
/* scheduledTaskRegistrar.addTriggerTask(() -> process(),
triggerContext -> {
ScheduledRequest scheduledRequest = new ScheduledRequest();
scheduledRequest.setCronName("erpCheck");
@ -35,7 +32,7 @@ public class IoErpCheckTask implements SchedulingConfigurer {
logger.error("cron is null");
}
return new CronTrigger(cron).nextExecutionTime(triggerContext);
});
});*/
}
private void process() {

@ -190,6 +190,9 @@
</trim>
WHERE id = #{id}
</update>
<update id="updateSupplementOrderType">
update basic_bussiness_type set supplementOrderType = #{action} where action = #{supplementOrderType}
</update>
<delete id="deleteById" parameterType="Map">
DELETE
@ -216,6 +219,7 @@
select name, action
from basic_bussiness_type
where mainAction = #{mainAction}
and supplementOrderType is null;
and supplementOrderType is null or supplementOrderType = ''
and corpType = 1
</select>
</mapper>

Loading…
Cancel
Save