|
|
@@ -34,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
|
@@ -107,7 +108,8 @@ public class StaffService extends BaseService<Staff> {
|
|
|
SaleChannelMapper saleChannelMapper;
|
|
|
@Autowired
|
|
|
WarehouseMapper warehouseMapper;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ MoneyAccountMapper moneyAccountMapper;
|
|
|
@Autowired
|
|
|
PrintLayoutMapper printLayoutMapper;
|
|
|
|
|
|
@@ -351,6 +353,22 @@ public class StaffService extends BaseService<Staff> {
|
|
|
listDD.add(dictionaryData);
|
|
|
}
|
|
|
dictionaryDataMapper.insertBatch(listDD);
|
|
|
+ // 资金账户
|
|
|
+ List<Map<String, Object>> listMoneyAccounts = map.get("moneyAccounts");
|
|
|
+ List<MoneyAccount> listMa = new ArrayList<>();
|
|
|
+ for (int i = 0; i < listMoneyAccounts.size(); i++) {
|
|
|
+ Map<String, Object> m = listMoneyAccounts.get(i);
|
|
|
+ MoneyAccount moneyAccount = new MoneyAccount();
|
|
|
+ moneyAccount.setMacCode(m.get("macCode").toString());
|
|
|
+ moneyAccount.setMacName(m.get("macName").toString());
|
|
|
+ moneyAccount.setMacType(m.get("macType").toString());
|
|
|
+ moneyAccount.setBalance((BigDecimal) m.get("balance"));
|
|
|
+ moneyAccount.setFlgDefault((Boolean) m.get("flgDefault"));
|
|
|
+ moneyAccount.setDisplayNo((Integer) m.get("displayNo"));
|
|
|
+ moneyAccount.setCpId(cpId);
|
|
|
+ listMa.add(moneyAccount);
|
|
|
+ }
|
|
|
+ moneyAccountMapper.insertBatch(listMa);
|
|
|
// 计量单位
|
|
|
List<Map<String, Object>> listUnits = map.get("units");
|
|
|
List<Unit> listU = new ArrayList<>();
|