This commit is contained in:
Lemon
2023-06-27 10:57:42 +08:00
parent cf741ac3ce
commit 3b87e0c71c
3 changed files with 14 additions and 2 deletions

View File

@@ -386,12 +386,23 @@ public class PileBillingTemplateServiceImpl implements IPileBillingTemplateServi
*/
@Override
public int changeStationTemplate(PileBillingTemplate pileBillingTemplate) {
PileBillingTemplate template = new PileBillingTemplate();
// 先将以前正在使用的模板查出来状态改为0
BillingTemplateVO billingTemplateVO = queryUsedBillingTemplate(String.valueOf(pileBillingTemplate.getStationId()));
if (billingTemplateVO != null) {
template.setId(Long.parseLong(billingTemplateVO.getTemplateId()));
template.setStatus("0");
updatePileBillingTemplate(template);
}
// 将当前这条模板状态改为1
template.setId(pileBillingTemplate.getId());
template.setStatus("1");
updatePileBillingTemplate(template);
// 下发站点下所有桩
// pileRemoteService.publishBillingTemplate()
return 0;
}