|
@@ -207,6 +207,83 @@ public class TTsNewServiceImpl implements ITTsNewService {
|
|
|
*/
|
|
|
@Override
|
|
|
public int updateTTsNew(TTsNew tTsNew) {
|
|
|
+ TTsNew tsNew = tTsNewMapper.selectTTsNewById(tTsNew.getNewId());
|
|
|
+ if (tTsNew.getPlanStatus() == 1) {
|
|
|
+ TTsFirstplan tTsFirstplan = new TTsFirstplan();
|
|
|
+ tTsFirstplan.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsFirstplan tsFirstplan : tTsFirstplanMapper.selectTTsFirstplanListByNewId(tTsFirstplan)) {
|
|
|
+ tsFirstplan.setPlanStatus(1L);
|
|
|
+ tTsFirstplanMapper.updateTTsFirstplan(tsFirstplan);
|
|
|
+ }
|
|
|
+ if (tsNew.getPlanType() == 1) {
|
|
|
+ TTsLjplan entity = new TTsLjplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsLjplan item : tTsLjplanMapper.selectTTsLjplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(1L);
|
|
|
+ tTsLjplanMapper.updateTTsLjplan(item);
|
|
|
+ }
|
|
|
+ } else if (tsNew.getPlanType() == 2) {
|
|
|
+ TTsYsplan entity = new TTsYsplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsYsplan item : tTsYsplanMapper.selectTTsYsplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(1L);
|
|
|
+ tTsYsplanMapper.updateTTsYsplan(item);
|
|
|
+ }
|
|
|
+ } else if (tsNew.getPlanType() == 3) {
|
|
|
+ TTsFlplan entity = new TTsFlplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsFlplan item : tTsFlplanMapper.selectTTsFlplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(1L);
|
|
|
+ tTsFlplanMapper.updateTTsFlplan(item);
|
|
|
+ }
|
|
|
+ } else if (tsNew.getPlanType() == 4) {
|
|
|
+ TTsFtplan entity = new TTsFtplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsFtplan item : tTsFtplanMapper.selectTTsFtplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(1L);
|
|
|
+ tTsFtplanMapper.updateTTsFtplan(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tTsNewMapper.updateTTsNew(tTsNew);
|
|
|
+ }
|
|
|
+ if (tTsNew.getPlanStatus() == 3) {
|
|
|
+ TTsFirstplan tTsFirstplan = new TTsFirstplan();
|
|
|
+ tTsFirstplan.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsFirstplan tsFirstplan : tTsFirstplanMapper.selectTTsFirstplanListByNewId(tTsFirstplan)) {
|
|
|
+ tsFirstplan.setPlanStatus(3L);
|
|
|
+ tTsFirstplanMapper.updateTTsFirstplan(tsFirstplan);
|
|
|
+ }
|
|
|
+ if (tsNew.getPlanType() == 1) {
|
|
|
+ TTsLjplan entity = new TTsLjplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsLjplan item : tTsLjplanMapper.selectTTsLjplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(3L);
|
|
|
+ tTsLjplanMapper.updateTTsLjplan(item);
|
|
|
+ }
|
|
|
+ } else if (tsNew.getPlanType() == 2) {
|
|
|
+ TTsYsplan entity = new TTsYsplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsYsplan item : tTsYsplanMapper.selectTTsYsplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(3L);
|
|
|
+ tTsYsplanMapper.updateTTsYsplan(item);
|
|
|
+ }
|
|
|
+ } else if (tsNew.getPlanType() == 3) {
|
|
|
+ TTsFlplan entity = new TTsFlplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsFlplan item : tTsFlplanMapper.selectTTsFlplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(3L);
|
|
|
+ tTsFlplanMapper.updateTTsFlplan(item);
|
|
|
+ }
|
|
|
+ } else if (tsNew.getPlanType() == 4) {
|
|
|
+ TTsFtplan entity = new TTsFtplan();
|
|
|
+ entity.setNewId(tTsNew.getNewId());
|
|
|
+ for (TTsFtplan item : tTsFtplanMapper.selectTTsFtplanListByNewId(entity)) {
|
|
|
+ item.setPlanStatus(3L);
|
|
|
+ tTsFtplanMapper.updateTTsFtplan(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tTsNewMapper.updateTTsNew(tTsNew);
|
|
|
+ }
|
|
|
return tTsNewMapper.updateTTsNew(tTsNew);
|
|
|
}
|
|
|
|